Josh's Programming Journal

I am an application developer with 20 years of experience in automotive, bioscience, energy, and insurance industries. I made this blog for one reason, and that's to post tips about everything I'm coding on throughout the day -- "my journal". I currently lead a team of twenty programmers as chief software architect for a real-time chemical logic startup. I also work as a Ruby on Rails and C/C++ application development consultant. Please contact me if you have any comments or wish to discuss your projects. Thanks for visiting, Josh Vanauken
May 4 '10

1 note Tags: design patterns c++ java

May 3 '10

How to evaluate a freelance web designer

One of the key factors we look at when evaluating a [freelancer’s] portfolio is to see if there is real content that enforces a brand message or a targeted message in each design. As a simple example, ‘What is the point of this website?’ and ‘What should i do?’ are two questions to kick off the conversation. If you can’t answer these questions in 5 seconds, don’t hire this designer! A more detailed question regarding brand message and targeted message: ‘Does the content of the website reinforce the brand message?’ Without a real message behind the designer’s sites, he likely has no experience designing a website with real content. Most “Lorem Ipsum” website PSD designs prove nothing except elementary Photoshop abilities. 

This is how Brad Michaels, software architect from former EcoTek GmbH, describes selecting a freelancer. Brad is now working as a freelancer and recently did a stint here at Team Mockingbird. Mr. Michaels was very helpful in defining our new development process. He really understands how the business works.

Tags: freelancers targeted message brand message

May 3 '10

Tags: c++ pointer functions

Mar 13 '10
Is it me, or does the size of your text editor window impact the kind of code you write? TextMate’s small window size has sub-consciously made me write cleaner code!
— Josh

Tags: rails programming textmate

Mar 11 '10

The 33-33-33 Programming Rule

I have been leading software development teams with the 33-33-33 programming rule for some time now.

The rule: spend 33% your the time developing, 33% debugging, and 33% refactoring.

Most developers get up to 66%, and leave out the last step. In the development teams I’ve overseen, we encourage developers to spend time refactoring their code. You do not need to be embarrassed: the best programmers take the time to refactor regularly.

How often should I perform this 33-33-33?

For every sprint, bug, or feature you complete you should do the 33-33-33. For example, if you add “uploading files to the contact form on the website” you should spend 33% of the time programming the feature, 33% debugging and fixing anomalies, and 33% refactoring and commenting the code.

33% + 33% + 33% adds up to 99%. What do I do with the remaining 1%?

It is technically the “33.33333-33.33333-33.33334 Programming Rule”, but who wants to say that?

Are there times when I don’t need to refactor my code?

You always need to refactor the code you’ve added. However, if there is a significant exception or condition in the code you’ve added that needs to be rewritten or expanded you should file a separate bug to fix this and refactor the code around it.

The 33-33-33 Programming Rule is one reason why my programming teams have been so successful. I believe this rule enforces code ownership by expecting every developer to check in already-refactored code. If every developer is responsible for refactoring the code he writes, then ugly code never comes into our source repository.

Tags: programming

Mar 10 '10

Revolution OS: 5 of 5 stars! -Josh

1 note Tags: revolution os linux open source

Mar 10 '10
Perhaps if Sun had given away certification, instead of charging $1,000’s of dollars for it, they wouldn’t be out of business right now. Developers and business owners like free.
— Josh V.

Tags: sun microsystems corporate training

Mar 10 '10

The Best Programming IRC Rooms

On irc.freenode.net:

  • #rubyonrails
  • #ruby-lang
  • #C++
  • #C
  • #macdev
  • #posix
  • #mysql
  • #mediawiki
  • #capistrano
  • #gtd
  • #css

(First of all — no: IRC is not dead. In fact, for developers and programmers it’s as alive as ever!)

Tags: irc, rooms programming

Mar 10 '10

Ruby on Rails Development Process

I’ve worked with Ruby on Rails for 3 years now. After a dozen Rails sites in production, I have devised a Ruby on Rails Development Process. Many developers will disagree with this development Process; I ask those readers to keep in mind that this process is built on facts and hard experience.

The Ruby on Rails Development Process:

Step 1: Create a Photoshop (PSD) pixel-perfect mockup with all pages.

Step 2: Give management a walkthrough and get your sign off signature.

Step 3: Code the site in pure HTML/CSS/JS, using PHP includes and “static” server-side return values as placeholders, and validating all code

Step 4: Create a new Rails project, and implement each page that you created in Step 2 — one at a time

Do not:

  • Try to design while coding HTML while designing the database schema
  • Design half of the HTML/CSS/JS and say, “We’ll flesh this out in step 3”
  • Code HTML/CSS/JS before you have a finished the PSD mockup. It’s 5x easier to change a Photoshop file than to recode cross-browser compliant HTML & CSS
  • Code the rails “logic” before the HTML/CSS/JS is done — you will throw 95% of it away

Most developers want to code HTML while they’re developing the app. The problem with this is that most developers suck at design. By coding HTML while they’re developing the app, these developers somehow became self-appointed designers. And that’s no good.

Don’t invest in heroics and “the odds.” Chances are, you’ll end up like everyone else. Instead, go with best practices and experience of the pros. These 4 steps above will ensure your next Rails on Rails development process is as smooth as a baby’s bottom! And just to be clear — this is not my invention, just a best practice I see in use by other successful software architects and project managers in the industry.

-Josh V.

Tags: rails best practices html css javascript

Mar 10 '10
Double your efficiency with table-based layouts!
— Source: The Devil

Mar 10 '10

Tags: WiFi hacking

Mar 10 '10
Don’t make separate CSS files for each view in your Rails app. Put all of the CSS into 1 file called style.css after you delete scaffold.css.
— Josh Vanauken

Mar 10 '10

Tags: c style guides

Mar 10 '10

Citi supports IE6, AOL, and Netscape Navigator

How often can you say, “Today I called my credit card company and I hung up in a better mood than I called” ?

Trying to reset my credit card password for online access. I have to call them. The foreigner said “What browser,” i said safari he said we only support IE, AOL and Netscape Navigator. I misheard him so I said let me open up Firefox instead, and he said No — it had to be IE, AOL or Netscape. Started laughing uncontrollably. I mean uncontrollably. The last time I saw Netscape Navigator was in 1996 — literally. I told him it’s a simple HTML form and it’s worked in safari before. Come on, are you serious?

Trying to appease him, I go to the windows machine, boot up IE 6 (lolz). After clicking “OK” to about 3 security warnings the Citi homepage page opens up. God I hate windows. And IE. Like fucking nails on a chalkboard. SSCCRRRRCCCHHHHHHHH.

I go through the whole reset process with him still on the phone. Same error. He says, “Oh, that could be because we’re updating our servers now.”

“Oh, maybe it’s not safari then? Maybe it’s your fault?”

Yeah.

Hysterical. I was just trying to set up Mint. Netscape Navigator. Hysterical.

2 notes Tags: citi ie6 aol netscape cross-browser

Mar 10 '10
Has anyone ever done a fact check between Apple’s beloved Human Interface Guidelines and Apple’s actual programs? ahem Aperture, Logic, Xcode, Safari developer panel cough cough
— Josh