Categories: "Full Stack Dev & Design"

Mac instead of PC for PHP/Web development?

I have recently put together a new Core 2 duo PC for doing my web development. And I have been asked why I didn't get a Core 2 duo Mac instead...

The question definitely makes sense. You can now get essentially the same components into a PC or a Mac. So the choice would boil down to:

  • Design
  • OS
  • Software

Design

Well, the Macs look better, definitely.

However...

If you choose your hardware carefully, you can get a pretty decent looking PC. Check out these Antec enclosures (they have a nice quality feeling by the way) or these Sony displays.

And also, if you actually want to connect 3 screens to a Mac, you'll definitely need one of those bigger Mac Pros where you can put in a PC video card. And those sort of lose their coolness factor over the iMacs. But to be fair, I guess you could get away with a 24" iMac ;)

Read more »

CSS: Fixing overflow: hidden in IE

Internet Explorer 6 for windows has been giving me a hard time with expanding fixed width or fixed height boxes (divs) in the most non standard fashion...

The trick would be to apply overflow: hidden to the div to force the browser to hide any excessive content (text, images) instead of expanding the container. But IE6 will not always do as told... :(

I found out today that the trick with IE, is to apply a fixed width or height property to the same container (div) as the overflow property, and then, IE will always crop the contents as expected.

Note: you can specify widths and heights in ex, em or % (not just px). So it's only "fixed" in a relative manner.

PS: In some cases, you may want to consider the non standard IE CSS property word-wrap: break-word; This will break words too long to fit into the fixed width. IE only and non standard...

My favorite Firefox extensions

Here's a quick list of the Firefox extensions I'm using all the time for web development:

  • DOM Inspector
  • IE View (One button to check the same page in IE)
  • ColorZilla (Lets you check colors on a web page)
  • MeasureIt (Lets you measure Elements on a web page)
  • URL Link (Follow a link even if it's not clickable)
  • JavaScript Debugger (well I don't actually use that much but maybe I should)
  • QuickJava (Allows quick enable and disable of Java & Javascript from the status bar
  • Yet Another Window Resizer

The Java Generation and the lost art of programming...

"A sure sign of my descent into senility is bitchin' and moanin' about "kids these days," and how they won't or can't do anything hard any more."

So goes the intro to Joel's "The Perils of JavaSchools".

Higly relevant and highly recommended, as usual! ;)

"Pointers and recursion require a certain ability to reason, to think in abstractions, and, most importantly, to view a problem at several levels of abstraction simultaneously. And thus, the ability to understand pointers and recursion is directly correlated with the ability to be a great programmer.

[...]

You need training to think of things at multiple levels of abstraction simultaneously, and that kind of thinking is exactly what you need to design great software architecture."

Among other things, Joel talks about how Universities made the mistake of replacing courses on C pointers and recursion with courses on simple Java... and those universities include UPenn... my second most enjoyable experience in the 90ies (the most enjoyable one being the bubble of course! ;D)

Also, Joel talks about how it gets difficult to distinguish the top programmers from the average because you can't ask them about pointers & recursion right out of school any longer... I've got the same issue with database programmers. You can't ask them about concurrent transactions and normalizing databases any longer... Ironically, I learnt most of that at UPenn... back then in the 90ies... :>>

Rasmus: "I don't like SOAP"

At the PHP Forum in Paris this year, Rasmus Lerdorf (the creator of PHP) wittily explained that SOAP was "intrinsically broken" because it's too complex... "just as anything that takes more than 20 minutes to understand".

I liked the way he put that! ;)

When it comes to webservices, I myself tend to prefer XML-RPC (which goes by the motto: "Does distributed computing have to be any harder than this? I don't think so.")... Sometimes, I also wonder if REST would be a nice alternative...