Posted by: phil swenson | August 15, 2008

Switching to Mac

I’ve been curious about Macs for a while now.  For the past couple years I’ve noticed the number of Macs at developer conferences steadily increasing.  I’d say 40-50% of the developers and 90% of the presenters at conferences are now using Macs….   And it seems like all the cutting edge people I know have made the switch.  But I didn’t want to drop 2K and then find out I didn’t like a mac…. pretty expensive mistake.

Luckily, my employer wanted me to work on an iPhone app so they had no choice but to buy me one.  So in March they bought me a 15″ MacBook Pro :)

After using a mac 100% of the time for 5 months now, I would have to say that I prefer the Mac in almost every way over windows.

Why?

1)  Command line – Having a real terminal/command line is huge.  I’ve never been a huge command line guy, but I’m becoming more of a CLI fan every day.  Having a console that you can <gasp> COPY/PASTE with easily is nice.  Tabs in your command console are great.  The unix “alias” command is hugely useful.  I don’t understand why in 2008 MSFT still doesn’t have a decent command line tool.  Yeah, there is PowerShell, but it’s an external add on and it still is the same shitty, hobbled interface (no tabs, awkward copy/paste, lame lame default settings).

2)  Better UI – expose, spaces, the dock, a single menu bar at the top, windows group by application, pretty much everything…. it’s simply a better user experience than windows.  No C: drive.  No cluttered start menu.  Installs are instant (simply drag to your applications folder). Uninstalls are instant too.  Wireless setup is much more elegant than Windows and works much better.  My printer settings JUST WORK.  I’ve never been able to consistently print at both home an work before… but the Mac detects which printer is available and it JUST WORKS.  Applications are much more consistent on the mac.

3)  Hardware – simply awesome.  I love the power supply.  I was in the airport a few weeks ago plugged in.  This little kid came hurdling by and tripped on the power cable.  My old Dell would have gone flying, but the magnetic cable just popped off, no biggie.  Every detail is well thought out.  The power supply is very small, even has little clips that fold out to wrap the cable around for travel.  The laptop is much thinner than my old Dell 620.  Thinner is more important than width and height IMO.  I don’t know what it is about the trackpad, but it simply works much better than the Dell.  The connectors are on the side, where I can actually get to them.  No useless old-school serial port like the Dell (I bet I haven’t used a serial port in 5 years).  Since there are no connectors on the back, they put the display much lower in the chasis so you keep the height at least 1/2″ less than it would have been.

4) Apps are better.  Apps are more consistent and seem to be of higher quality for the Mac than their windows equivalents.  I don’t tend to do native coding so I’m not sure why this is, but my guess is that the APIs are better and more powerful.

5) Stability.  As long as I’m not running Parallels, it’s pretty much rock solid.  Much fewer crashes.  If I’m running parallels it’s probably about the same as Windows.  When I close the lid on the laptop or put it in sleep, it actually sleeps… EVERY time.  My old Dell would refuse to sleep quite often and I’d pull my laptop out of my bag and it would be COOKING.  2008 and MSFT still can’t figure out how to sleep the OS right.

6) OSS community – you can pretty much download any *nix project and get it to work on the Mac.  There isn’t nearly as much OSS work being done on Windows and what there is tends to be of lower quality and lagging.  For example, Git is making a huge move in OSS but there still isn’t a decent Windows implementation.  Ruby is more stable and has much better support on OS X.

7) Your development environment is close to your production environment.  Most projects get deployed to *nix.  If you run *nix you can more accurately simulate your production environment.  You have fork and pipes.  You don’t have to write different scripts for dev and prod.

Negatives….

yes, there are some negatives.

1) Java is slower.  IntelliJ is pretty clunky on a mac.  Quite a bit slower, and it’s a slow beast to begin with.  I’ve noticed that every Java app is slower though… startup times on my old 620 were 30 seconds for one of my company’s java products, and they are 40 seconds on the mac.

2) Java stops the machine from shutting down.  Any running java app with reject a shutdown and you have to manually shut down the app before doing a full shutdown.

3) Apps cost $$$.  You are much more likely to have to shell out some money for a Mac application than a Windows app.  Of course the applications are usually better on the Mac.

4) The keyboard shortcuts are odd.  I don’t mind switching to command over control, but I found the page up, page down, home, end key behavior to be bizarre.  I much prefer the windows behavior for these keys.

5) Finder sucks.  It hides the real layout of the file system from you.  It also doesn’t let you type in the path to navigate to like Windows Explorer.  I switched to PathFinder, which is pretty good – but it’s not free.  Finder needs a “power” mode.

But these are pretty minor complaints that I can live with or work-around.  IMO if you are a professional developer and are still on Windows, you are hobbling yourself

Posted by: phil swenson | March 28, 2008

Java coding practices that bug me

  1. Use of checked exceptions.  IMO checked exceptions are a failed experiment.  This is a blog post in itself, but I think Bruce Eckel makes a good argument here: http://www.mindview.net/Etc/Discussions/CheckedExceptions
  2. Interfaces with one implementer.  Why create an interface if you only have one implementer?  I was just working on some 6 year old code where everything had an “ImplementationInterface” and only one implementation – “*JDBCImpl.”  The thinking being that there might, someday be another persistence implementation.  Well, 6 years later and there is still only a JDBC implementation and the result of the interface is annoyance, extra code, extra complexity, and yet another layer of indirection.  If you decide to add another implementation, then and only then add the interface.
  3. StringBuffer/Builder.append instead of using the String + operator.  Come on.  Unless you are in a tight loop or something there is no reason to do this.  In most cases it compiles to StringBuffer/Builder anyway.  And it’s ugly.
  4. Creating complexity “ahead of time.”    See #2.  Programmers are terrible at predicting the future.  Add complexity when you need it.
  5. No defaults for configuration.  Java has a pervasive XML configuration culture – dunno why.  For some reason almost every Java coder thinks it’s proper practice to create an XML configuration file for every conceivable setting that could ever happen (see #4).  And for some reason almost every Java coder never sets a default, forcing every user to configure the setting even if 100% of all users configure the setting to the exact same value.  Why not just set a default host/port/etc?  Let the “exceptions” be configured.
Posted by: phil swenson | March 10, 2008

Why does Firefox suck so badly?

I remember when Firefox was fast and used less than 100 megs of memory…Tasklist

Posted by: phil swenson | March 3, 2008

Making Java (or Scala) dynamic

We all know the benefits of static typing. You get awesome tool support. You get compile time checking (a weak form of testing). You get excellent performance.

But you give up a lot. ActiveRecord is impossible with static typing. So are Groovy Builders. Ruby on Rails could never be built with Java or Scala. Statically typed languages simplely can’t be bent to your will and “expanded” in ways that are needed to support these techniques.

I’ve been learning Flex lately. Flex’s native language is ActionScript 3, which is like a cross between Java and Javascript – standard OO constructs, optional static typing (which is encouraged), but with a little dynamicism built in. AS3 is an OK language. Not great, has a lot of the syntactic ugliness from Javascript/Java and doesn’t really leverage too much from its dynamic roots.

But one thing did catch my eye. Actionscript allows you declare a class “dynamic.” Doing this allows you do add properties and methods on the fly. It appears you can subclass any static class and declare dynamic. This opens up tons of possibilities.

This got me wondering: is it reasonable or possible to extend Java or (more likely) Scala to support dynamic classes? Can we have the best of both worlds?

I don’t know if this is a good idea or what the implications are.  But on the surface is seems like it might be a “best of both worlds solution.”

Posted by: phil swenson | February 14, 2008

Your transaction # is 393950303005-A583895

Pet peeve of the day:

Every time I make a transaction over the phone I get a long ass transaction number.  Does anyone actually write down their transaction number?  Where did this strange practice originate?  Has anyone ever heard of looking up a transaction by identity?

 

Posted by: phil swenson | January 22, 2008

How to give the economy a pop

Congress should pass a resolution that the US vows not to invade any other countries this year.  Instantly you will see oil drop $20/barrel, world markets will soar, and people will start spending.  Not blowing shit up would be way more effective than any of the tax credits being talked about.

Posted by: phil swenson | January 18, 2008

Corporate Email Sucks

Am I the only one who finds it strange that my free private email experience is probably 100x better than my work email experience?

At work I am limited to 10 meg attachments, very slow reponse time, constant client crashes, login only via VPN (which is slow and clunky), tons of spam, 100 meg inbox limit, no cell phone integration, and can never find anything because the search is so poor.

For private email I have a fast browser client for free with 6 gigs space, virtually no spam, instant search, great calendar, 20 meg attachments, and excellent access from my phone.

As I’m sure you guessed, at work I’m using Outlook against Exchange and for private email I’m using Gmail.

So why do companies still bother with Exchange/Outlook?

Posted by: phil swenson | January 18, 2008

Productivity tip for devs

One of the most useful utilities on windows I’ve found (and used for years now) is called Clickie:  http://defoort.free.fr/clickie/.   It doesn’t do much – justs adds a “Copy Path Name” to the context menu in Windows Explorer.  Which if you are a dev you end up having to do about 10X a day.

Posted by: phil swenson | January 16, 2008

WTF?

Why is it that I clicked delete on a 2KB file in Windows explorer and I’m able to write a blog post about it and publish it before it finishes deleting?

WTF?

Posted by: phil swenson | January 16, 2008

JRuby on Rails coolness

add this to your environment.rb and you add all the jars in your lib directory to your classpath.

Dir["#{RAILS_ROOT}/lib/**/*.jar"].each do |jar|
  require jar
end

Older Posts »

Categories