Archive for the ‘Coding’ Category

SVN Mania

Saturday, November 8th, 2008

Versions app

I’ve been meaning to set up Subversion for source control on my various projects. After having worked in an environment with tight source controls for almost half of a year, I’ve gotten used to the convenience and peace of mind of having a source control in place. So today I took the plunge and got svn to work with a SVN client, Versions, along with my favorite lightweight code editor Coda, on my MacBook Pro.

Life is good.

Validated. Professionally.

Tuesday, June 10th, 2008

One of the downsides of working as a contractor doing most of the work at home, alone, was that I never really interacted with my peers professionally. All I had was Google and a few books. So I had to learn and teach myself everything based on what I “read” as best practices. A lot of those learning experiences were trial and errors. But in many ways, this was a good thing because I was a clean slate without the burdens of pre-existing, outdated methodologies an established company may impose on its staff.

So when I decided to take up a “job”, one of my objectives was to find out if what I know is what’s being practiced by my peers. I wanted validation to my methodologies. And I wanted to learn more from others. My new job basically gave me a free reign on most of what I’d like to implement. So I brought with me my methods of client-side development in terms of CSS (and CSS resets), Unobtrusive Javascript programming, semantic XHTML markups, separation of structure, presentation and logic… etc etc. But I still have no idea if there’s more to be learned. Surely there was.

The company decided to hire a technical auditor to audit all the technical aspects of what we do and how we do it. I was thrilled and was really looking forward to learning from this guy. About 15 minutes into my explanation on what I do, I asked if he’d recommendations on how I can improve on what I do. He answered, “Nope. You are ahead of the game. You are doing everything I’d recommend my clients do.”

I was really pleased to be validated by someone who’s job is supposed to magnify and correct inefficiencies and issues. He was surprised I was even using Unobtrusive Javascript programming because so few people even have heard of it, let along practicing it.

So that made my day. Now I know I am actually up to par with the top ranks and I should probably raise my rate. ;)

Full Time Employment Again (Almost)

Saturday, May 3rd, 2008

After almost four years of freelancing and eating Bryan’s food scraps, I finally caved in and signed a short-term contract with a local startup as a Flash developer. Since the company is in this super stealth mode, I don’t want to reveal too much about what it is. But I sure look forward to learning some enterprise-level skills after having worked almost entirely independently.

Actionscript has come a long way with v3.0. But I was surprised how fast I picked it up with my first Flash project a while back considering how much I hated Flash. It’s going to be interesting to see how I will be using it in an almost entirely Object Oriented environment using Model, View, Controller concepts — both of these things I actually wrote on my white board earlier this year as my new year resolutions for 2008…

I will probably hop on the “full time” train once I have checked out the potential of the project. I am definitely not going to repeat the same mistakes when I was a full time employee last.

Ah, life.

Installing Multiple Firefox Version on Windows XP and Mac OSX

Friday, February 29th, 2008

As a web developer, one of the worst nightmares has to be dealing with all the different browsers under the sun (not to mention the various versions).

I wrote about installing different versions of Internet Explorer on Windows XP for testing purposes (simply because each version is so drastically bad in its own unique way that you need to test each one of them separately). I had decided to take that one step further with Firefox today.

Thank goodness for oldapps.com, I was able to get hold of Firefox 1.0 and 1.5 to play with in XP.

Installing on Windows XP (not for the faint of heat, or you can try the standalone versions of Firefox without worrying about going through the troubles.):

1. Download and install an older version of Firefox. When you run the installer, make sure you choose custom installation and install this version in a different directory. For example: Mozilla Firefox 1.0 (in keeping with the default naming convention). Continue installation as prompted. DO NOT RUN Firefox when it’s done.
2. Open Windows Command Prompt and type the following and press Enter:
set MOZ_NO_REMOTE = 1
3. In the same Command Prompt, type cd and find your way to the version of Firefox you just installed. Using the folder naming convention above, it’s probably something like this:
cd /"Program Files"/"Mozilla Firefox 1.0"/
4. Once you are in the directory, type the following and hit Enter:
firefox.exe -profilemanager
5. Firefox’s profile manager should now appear. Now create a new profile and name it accordingly (i.e. firefox1.0). If you want, name the default profile to the version of Firefox you currently have prior to the installation.
6. Now go to the appropriate Firefox folders and make shortcuts from them and put them where you access them the most (The Taskbar in my case).
7. Right click on the shortcuts and select Properties to pull up the Properties window. In it, there’s a Target field. At the end of it (after the double quote), append the bolded typeface in the following:
"C:\Program Files\Mozilla Firefox 1.0\firefox.exe" -p Firefox1.0

Do this with each version of Firefox shortcuts you have with a matching profile name. And you are done. The only caveat is you can't run multiple versions of Firefox concurrently like you can with the "Multiple IE" install.

Here’s what my VMWare Windows XP Taskbar looks like:
windows xp taskbar

Installing on Mac OSX:

The process is similar to those found on Windows XP. But I couldn’t get them to work as advertised. So I can’t really endorse the methods here. But there are standalone versions out there that made my life easier.

The upside of Mac OSX is, multiple versions of Firefox can be running at the same time!

UPDATE: I did manage to get multiple Firefox versions to work without asking for a profile upon launch every time as described by Jeroen Coumans’s blog (PDF). But there’s a trick that you should know about!

For the life of me I couldn’t get them to launch without asking for a profile even though I followed the steps exactly. The problem? I had three versions of Firefox in the same directory labeled:
Firefox 3
Firefox 2.0
Firefox 1.5

That’s a NO to the hack described on the site. In order for the script to recognize the paths, the portion of the name following the word “Firefox” can not be repeated. I have tried “Firefox-” followed by the version number, but that didn’t go. And underscore didn’t do it either. But if you simply remove the space making the names looking like:
Firefox3
Firefox2.0
Firefox1.5

Then all is good.

I will probably install a couple of older versions of Opera as well since they are supposedly pretty simple — simply install different versions of Opera in their own folders and be done with!

via [JiveBay] and [Jeroen Coumans]

Rediscovering Simplicity

Wednesday, January 2nd, 2008

I’ve been sweating bullets with this project I’ve been working on with Neely — he’s supposed to be demoing it at a major conference in New York with a partner in a couple of weeks. But I am still not quite where I’d like to be in terms of polish and grace.

Neely’s been telling me to just code for the immediate requirements and nothing more. But my philosophy has always been to look ahead just a little more and prepare for what’s to come as “no-brainer” feature requests. Apparently this type of thinking has been hurting my development time on this project…

I rarely read Wil Shipley’s blog entries because they are usually quite long and sometimes very technical. But just out of the blue I decided to read “something” today. And there I came across his coding strategy and philosophy on coding for only what’s necessary and nothing more.

I’ve always understood the idea of “push it out to the market first and fix it later”… But I just never felt right implementing that in good conscience knowing that I am purposely releasing a faulty software only to fix it when complaints flood in. But the way Wil explained it made a lot of sense to me and I think I am going to make what he says in that article my focus from now on — if there ain’t complaints, it ain’t broke. And if there ain’t requests, it ain’t a useful feature.

Live and learn…

Javascript Debugging for IE

Tuesday, August 14th, 2007

In 2007, the year when the word Web 2.0 is taking over the world of Internet and seen as the resurgence of the another wonderful dot-com era, the world’s favorite web browser, Internet Explorer, still does not have a proper Javascript debugger. You’d have to go through hoops just to get one working by alternative means. How can developers working with IE’s framework love its technologies I guess I’ll never understand…

Some people claim MS is all goodies under the hood for developers. Com’on, where are the goodies? I haven’t met a web developer who doesn’t hate IE.

People who continue to use IE by choice are idiots. There. I’ve said it. Idiots. Idiots. Idiots. Start using better browsers from companies who care so that the World Wide Web can be a better place!

Ok. I feel better now… Back to dealing with crappy IE for idiots who prefer it.

Microsoft should change their marketing tag line to: Your Misery. Our Passion.

Ajax and LAMP Coders Wanted — ASAP

Friday, July 27th, 2007

Today I got another call from a recruiter about a potential Ajax/LAMP position they are looking to fill. Without me doing any active advertising, this is probably the 5th or 6th contact from recruiting companies looking to fill a similar position in the San Francisco Bay Area.

This reminds me of Jason’s comment on how his other programmer friends told him that any coder in the Bay Area can get a job if he just sticks his resume on a rock and slingshot it in any direction. Just a couple of days ago, VMWare’s recruiter also contacted me about a similar position…

Too bad I can’t be employed on a full time basis.

Apple Javascript Documentation Ignores IE

Wednesday, July 18th, 2007

I was reading through some documentation on Apple’s Developer Connection site when I noticed that Apple completely left out IE when recommending developers to test their Javascript codes on other browsers.

Apple documentation ignoring IE as recommended browser to test Javascript with

Granted there are actually a number of other browsers not listed there, given IE’s lion’s share in the market, I found it amusing that they chose not to mention it at all. Considering Microsoft bailed out Apple at the brink of its demise back in the days, perhaps Apple ought to be a little nicer to Redmond even if they know Microsoft is just making bad copies of whatever Apple makes anyway…

Testing Localhost Developments in Internet Explorer via Parallels on Mac OSX

Thursday, July 12th, 2007

Developing web applications can be a frustrating job solely because so many people still use various versions of Microsoft Internet Explorer — possibly some of the worst browsers compared to most of the other modern browsers in terms of adherence to web standards. But I can’t just not test my applications against them simply because I hate them… So the war continues…

One of the problems of testing web apps under Parallels with IE is, instead of testing development URLs such as http://localhost/, usually IP addresses have to be used, like such http://192.168.0.100, to reach OSX’s localhost server (because localhost on Windows would entail having an actual web server running under Windows). The problem with that is that some applications such as WordPress need to have a full absolute path in order for it to work properly (especially when dealing with themes). I’ve tried a couple of workarounds, but nothing is as simple as using Apple’s own Bonjour technology.

I found a post that explains how to set it all up. Even though his example deals with running Ruby on Rails, the idea is exactly the same for other development environments such as PHP and Java (enable port 80, 443… etc). Now I am a happy camper…

via [the naked brain]

Unobtrusive JavaScripting

Friday, July 6th, 2007

Recently I’ve been looking into ways to make my code more maintainable after having to support an old site I did and some Actionscript code from someone else. One of the things I found and REALLY liked was the idea of using Javascripts in an “unobtrusive” manner. Basically all it means is to take out those Javascript event calls like onClick, onMouseOver and such from the presentation layer (CSS style sheets and HTML tags), and use other means to achieve the same effects.

What I’ve found useful and have been using ever since are these classes:

1. Prototype
2. script.aculo.us
3. Behaviour

There are tons of extensions and subclasses written for them, making them super useful when you want something done quickly and effectively. I especially like Behaviour for its simplicity and the ability it affords me to completely separate Javascripting from tangling with my HTML codes (hard coded, dynamically generated or otherwise).

There are other useful ones such as jQuery and moo.fx, but I’ve been pretty happy with those other three core packages so far.

Incidentally, Apple’s revamped site also has a lot of new Javascript-driven effects that are pretty interesting to look at and experiment with. Another really clean and simple site I like is Panic’s Coda product site. Really very effective use of Javascripts in presentation.

There’s always so much to learn with so little time… What to do!!

Two Weeks in Flash Actionscript

Wednesday, June 13th, 2007

This is my second week coding full time in Flash Actionscript. Sooner or later I’d have bumped into things that would drive me crazy… And here’s a small list of what I’ve encountered:

1. XML feeds, masking, embedded fonts, css styles (for the XML feeds) and scrollable areas is a combination for hours of fun headaches. One can easily spend all night trying to figure out why something doesn’t work the way it’s supposed to… Certain things are very poorly documented by Adobe (formerly Macromedia).
2. Flash is most useful when used with Actionscripts… Some designer/coder wannabes try to do Actionscripts but instead have code littered all over the place… It’s just NOT cool!
3. Sometimes what seems easy can be more than a handful when you try to code for it… Simplicity can be deceiving in Flash/Actionscripting….
4. Components are your friends. Use them whenever you can. Customizable ones are totally worth every penny if you had to buy them. Just weigh the time you could have spent on it if you had to code that biatch yourself…

I also learned a couple of client-management tips from Jiann… Even though Brian tried to warn me about some of these things, I’ve had some pretty pleasant clients that I didn’t think running into one of “them” was in my Karma…

1. Clients are always right even when they give you some of the worst designs, features and requirements to work with.
2. Trying to beautify, improve upon or enhance anything this type of client gives you only will give you more grief later… because he’s just going to ask you go fix it back to exactly the way he had it… never mind how stupid, unusable, ugly or impractical the design elements or features are.
3. It’s all about ego, pride and control. Some clients want to feel they are in control and will ask you to do crappy stuff even though they knew your solution was better.
4. Stand up to unreasonable requests and demand overage. Or else feature creeps will never stop if the pay is on project basis. Some clients think they own you if they are paying you… Just say “NO” to abusive clients…
5. Being over-confident in your ability to pick up new programming skills can make you lose valuable sleep and family time… :(
6. Never mind that you have just achieved miracle doing something nobody thought was undoable given how short the deadline is. This type of client will always look for the smallest fault and overlook the fact that you just completed some of the most important features of the site.

Ok… now I feel better….

Back to coding…

One Week Developing Flash Actionscript

Friday, June 8th, 2007

After having developed in Flash for almost a full week, I can honest say that….

1. Flash rocks.
2. Actionscript is not too shabby.
3. Flash can truly do some wonderful stuff.
4. I am looking forward to seeing what Apollo and Flex can do…
5. If inherited from the wrong hands, Flash/Actionscript is a bitch to maintain and extend… All you Actionscript code “litterers”… you know what I am talking about…. Please freaking code everything in ONE FRAME! Take advantage of Actionscript’s Object Oriented design. Damn it…

Again, I can’t thank Murdza and lynda.com enough for bringing me up to speed so quickly on this…