Design Patterns

This is another topic that was not fully covered in my computer science degree and I think it is a very useful topic for when you actually start working. Design patterns are basically reusable solutions to common problems. They fall under three categories: creational patterns, structural patterns, and behavioral patterns.


Creational Design Patterns

Creational design patterns are all about class instantiation.

Names of Patterns:

  • Abstract Factory
  • Builder
  • Factory Method
  • Object Pool
  • Prototype
  • Singlton

Structural Design Patterns

Structural design patterns are all about class and object composition. It does this with classes by using inheritance to compose interfaces and then composes objects in different way in order to obtain different functionality.

Names of Patterns:

  • Adapter
  • Bridge
  • Composite
  • Decorator
  • Facade
  • Flyweight
  • Private Class Data
  • Proxy

Behavioral Design Patterns

Behavioral design patterns are more concerned about communication between objects.

Names of Patterns:

  • Chain of responsibility
  • Command
  • Interpreter
  • Iterator
  • Mediator
  • Memento
  • Null Object
  • Observer
  • State
  • Strategy
  • Template method
  • Visitor

As you can see there are many different patterns for each category. Although do not think all of these patterns will answer all of your programming problems. There is some debate on how useful design patterns actually are and when to use them. I would find a pattern that you find interesting and try to implement it in a side project before using it for actual work and be sure that using a pattern is the best way to do things before implementing it in your project.

You can find more information on all of these patterns at Source Making

Top 5 Debates Among Programmers

This is a post that I thought would be funny to do, and who knows you may have overheard some of these debates in one of your computer science labs.

  1. Tabs VS Spaces
    • This is a common debate among programmers and the debate can get really heated. Who knew that a simple things like tabs and spaces could do such a thing.
  2. First Programming Language
    • This is a long-standing debate and usually has a lot of biases. The main reason someone says one language is better to learn first is because it is the programming language that they began with. You can read more about this topic from my article: What is the first programming language you should choose?
  3. Bracket Placement
    • This is another one that doesn’t actually seem like it’s a big deal, but programmers have very strong convictions on where they place opening brackets. Some say you place it on the line of the statement and others say it goes on the next line. I personally prefer it on the same line. What does everyone else think?
  4. Best Operating System
    • This sometimes is a debate that happens between non-programmers as well, but it is definitely something that programmers have strong opinions about. Granted most of this is just bias. Each operating system has its own pros and cons for the job needed to be done. You can see more about this in my article: What is the best operating system?
  5. IDEs
    • All programmers have their personal choice in IDE. It could be sublime, notepad++, eclipse, visual studios, ect. and each programmer thinks that their IDE is better in some way. If you look through my blog posts you will see that even I have a bit of a preference for a certain IDE. There is really nothing wrong with other IDEs and is really up to the preference of the programmer. They are essentially just tools that we use to accomplish our goals.

These are the top 5 debates programmers have with each other, and if you are just getting started in the field you will hear them soon enough. What is your favorite IDE and why?

What is Atom?

If you came to this post wondering what an atom in physics is then I have bad news, I am talking about the text editor Atom. This is a very nice text editor for writing code. It supports many programming languages and has some features, like auto-complete, that makes it great for any programming. It also has several add-ons that can make your life a lot easier, like a nice to-do list add-on.  Another thing that I really like about it is that there is a version for all the operating system and they all work very well for each OS. This means that I can be consistent when switching between operating systems. This is just my preference but it is really nice to be able and work in the same environment on all three operating systems. Granted there may be times when you need an actual IDE for the task at hand, but when you don’t require one then I suggest using Atom. There are other alternatives, like notepad++, but it doesn’t work as well with Mac OS as it does with Windows.

Checkout Atom for yourself.

Easy to access cheat sheets for programmers

One thing that is very different from going to school for computer science and actually having a job as a software engineer is that in school you are expected to keep everything inside your own head and not rely on an outside source. In the world of software engineering you have the option to actually look up anything that you do not know off the top of your head. Granted that you cannot constantly be looking up things and even if you do it very rarely it ends up taking a lot of time trying to find the specific thing you are looking for. That is where cht.sh comes in handy. This website lets you look up cheat sheets on a lot of different languages and even has a way of  searching the web for content if it does not already have the answer you are looking for. It isn’t even necessary to go to the website in order to look things up. You can simply use the command line to access everything. It has some predefined cheat sheets and even has a tutorial over the basics of many languages. There is a command for searching the documentation or if it can not find it then it will simply look up an answer for you. It is a very nice tool to have as a developer and can come in handy when needing a quick refresher on something.

What is the best operating system?

There have been numerous debates on which operating system is the best to use as a software engineer. You will find someone in every corner trying to convince you that the operating system they use is the best. The truth is though it comes down to preference and what kind of software you are using at the end of the day. Even in your job it will come to what the business prefers and what software they are invested in. At my work we are highly invested in Microsoft so it is only natural that we use Windows 10. Granted it’s not my favorite operating system, but that is just my preference. In reality as a software engineer I would suggest that you get familiar with all the operating systems, well mainly Microsoft, OS, and one Linux distribution that you like. This is so you will have experience working in all 3 and be able to adapt when your job calls for it. So I wouldn’t focus on which operating system is better and just learn to use the 3 of them, this will ultimately help you in the long run. Don’t let people convince you that one operating system is better to code in than another either because that just isn’t true. They are all fine to code in and again that really just comes down to preference.

How do you get your first job in software engineering?

There is no sure fire way to get a job fast, but there are some steps that you can take. The first step is searching for openings at companies and then applying to them. Remember that you will probably get rejected 10 times before you actually get an interview with one. Also remember that if they do not explicitly say that you cannot reapply for a position then any time they re-post the job offer apply for it again. There is usually no harm in doing this, it is actually how I got my first position. Also attend job fairs whenever they come around and be sure to scout out the companies before you go. Once you get an interview then you follow all the simple rules about showing up on time and dressed appropriately. Honestly all companies do different things for the interview process and ask different questions. At least get to know the business the best that you can before the interview. After that just do your best and try to learn from the experience if it does not work out. Also, don’t be afraid to ask around about job openings from friends or even have your friends ask about job openings. That may be the fastest way to get a job, but still apply for others just to get experience. Remember that the entry level job will probably expect you to know very little about how they actually do things at the company and that they probably expect it to take a few months before you are relatively up to speed. So try not to worry if you don’t get everything on your first day on the job and feel completely lost.

What is the first programming language you should choose?

I decided that for the first post on the blog I would tackle a very common question in computer science. This is a question that has been debated by many people and colleges for that matter. Some people will tell you that you need to learn C++ or C first because they will make other languages easier to learn later or that they are the only way to truly get a grasp on some programming concept. Others will tell you to learn python or ruby because they are easy to pick up and you can see results fast. There is always a reason why someone recommends one language over another. Usually though the main reason that someone suggests a language is because that is the language they have grown to like or it could be an “earn your stripes” mentality. The simple answer is that there is particular language that is better to start with then another. The main thing to do is find out exactly what you want to do. If you want to make websites then you will probably start in a different language then if you want to make an app. Even then you will have several languages to choose from and for that you will just have to pick one and start coding in order to find out which language you like best, because at the start it only matters that you enjoy programming. So just go find a language you like and then start coding practice problems from the internet.