Random Post: What do you do?
RSS .92| RSS 2.0| ATOM 0.3
  • Home
  • About Me
  • Quotes
  •  

    Ruby with a C++ Accent

    September 27th, 2006

    I’m writing Ruby code with a C++ accent, while Ruby’s core is small, it’s programming style is much more fluid and harder to get used, especially after coding in C++/Java/C# for the last 6 years.


    Design Patterns are missing language features.

    September 24th, 2006

    This is something that had been bothering me ever since I got my own copy of “Design Patterns,” it started after I finished reading the Creational Patterns. “Why is this so difficult?” I thought to myself, patterns felt incomplete, they weren’t solutions, more like frameworks for solutions.

    In Data Structures, we created Abstract Data Types in C using structs and typedefs, these ADTs provide encapsulation in C, similar to Classes in C++, except they are more difficult to implement. We were following the “Class” pattern in C, trying to overcome a limitation of the C programming language. It wasn’t until C++ that we were finally able to implement encapsulation easily with Classes.

    Back to the Factory family of patterns. After programming with Ruby and Python I realized we can use Meta Classes, classes that define classes at run time, as a substitute for the Factory patterns.

    With this type of programming, we don’t need to have factories and products, because these meta-classes are the factories. Languages such as Python and Rubysupport Meta programming, don’t suffer from the limitations of Java/C++/C#. If meta programming were available to us in C++/Java/C#, then we wouldn’t have to rely on Factory patterns, instead we would use meta-classes.

    Also, while thumbing through my Java Design Patterns book, I finally realized that sometimes you have to use the Adapter pattern because Java doesn’t allow multiple inheritance. I understand that multiple inheritance can be dangerous, but, it is still a limitation of the language.

    I’m sure other patterns from the GoF have their own counterparts as language features in other languages, but I don’t know them, yet.


    The Law Of Demeter

    September 24th, 2006

    I’m posting this here so I’ll remember it, and because it’s one of those simple things that people in software development often forget.  A method of an object should invoke only the methods of the following kinds of
    objects:

    1. itself,
    2. its parameters,
    3. any objects it creates/instantiates;
    4. its direct component objects.

    I read about the Law of Demeter at javaguy.org


    Design Patters

    September 22nd, 2006

    Is it me, or do Design Patterns really highlite the shortcomings of the C++/Java/C#?


    How to create an effective resume

    September 14th, 2006

    I’ve been on both sides of the interview table, sorted through and read hundreds of poorly worded and contrived resumes until my eyes bled. For my sake and for those who have to read you resume, here is some advice on writing an effective resume.

    • Get the interview. Don’t forget the sole purpose a resume is to get the interview, a resume will not land the job for you. Do not try to get the job by overwhelming the reader with irrelevant information and boring details.
    • Remember your audience; strive to write the resume from the viewpoint of the hiring manager. Do your best to provide him with the information he wants, then organize your resume by placing the most relevant information on top. Think, what would you look for if you were in his position. Does he really care that you enjoy sports? If you don’t know, ask a friend.
    • Be specific not artificial. Try to avoid buzz words, they make you seem dishonest, instead be specific about your achievements, tell me why what you did was important and do it using active, not passive verbs. Also, please never mention the word synergy or “personal growth.”
    • Write an objective. I consider objectives to be an important part of your resume, it help me understand the type of job you are looking for. I also like it when you’ve customized your objective for the specific job opening. Write the objective yourself, do not copy and paste from sites like monster.com. If your objective sounds anything like the following I will burn your resume: “To acquire a position that will allow me to utilize my education, creative skills and talents, while realizing my full potential on a professional level and maximizing my personal growth.
    • Make it pretty. Just because your resume was sent to me in an email, it doesn’t mean you can’t make your resume standout from the rest. Make your resume easy to read by avoiding decorative or fancy fonts, using white spaces and headings to separate different sections of your resume and keeping things neatly aligned in tables (+1 point for invisible borders).
    • If you aren’t sure, follow the one-page rule. This is especially important when you are submitting your resume directly to the company. There is nothing inherently wrong with a two or three page resume, IF the job experience warrants it. When you’ve only worked as a cashier or a lifeguard during college then you should not have a two-page resume. When in doubt follow the one-page rule. Avoid creating resumes that are 1.5 pages long. If your resume is slightly over a page then fiddle with the font size, margins and gutters and get the resume to fit on a page.
    • Keep your resume current. There’s nothing worse than writing your resume after you’ve been laid off. Update your resume after major projects or promotions; ignore the one page rule for the time being. When it’s time to find another job you’ll be ready. Sometimes the hardest part is getting started, use the following to help you get started: “Resume.doc, Resume.pdf.” Find a format you like and get started!

    Time based queries

    September 11th, 2006

    Why are sequenced queries and queries that deal with time periods so difficult to express in current RDBMS?