Archive

Archive for the ‘Programming’ Category

HP Pavilion with Ubuntu 10.10

November 28, 2010 6 comments

I’ve been asked for an update of my experiences with my HP Pavilion dv6 3042TX – in particular with Ubuntu. A reader has found that this notebook can now be purchased here in Australia for $1,299. That is a fine price indeed! At that price, I would have considered “self insuring” and not spending the addition $200 or so on an extended warranty. However, I must say that I sometimes have regrets about not getting a Mac. Here are some of my experiences and advice:

The good

  • Aesthetics are good. Quite a good looking laptop. Not as nice as the MacBook Pro.
  • Quad-core. 8G RAM. 1G graphics.
  • The keyboard is fine (our reader had heard otherwise). Compared with MBP it even has PgUp and PgDn keys :)
  • Touchpad is fine (again, not sure why our reader would have heard otherwise). Not quite as nice as the MacBook Pro touchpad though – particularly for scrolling.
  • Some ports that MacBooks don’t have: HDMI out, eSATA out, fingerprint reader, blu-ray.
  • Running GeekBench on Ubuntu 10.10 can yeld up to 6300 so I assume that it is more performant than Windows 7 (which gets about 5600).

The bad

  • Battery life is only 1.5hr – just for light web-browsing tasks
  • When running Ubuntu 64-bit you will run into the 100% CPU problem caused by the npviewer.bin. AFAIK it’s a program that helps interoperate with the 32-bit Adobe Flash plugin because there’s no 64-bit one for Linux yet…
  • The fingerprint reader isn’t used for authentication out-of-the-box on Ubuntu 10.10 although I haven’t searched for any solution (pain threshold too low).

The ugly

  • It runs hot. Even when doing little cpu-intensive work the fans turns on and it sounds like it’s going to take off! I’ve had one or two blue-screens of death which I imagine are related to the heat. Lately I’ve been using FlashBlock which seems to have improved things somewhat.
  • With Ubuntu 10.10 after resuming from hibernate I get odd graphics flickering “effects” which is particularly bad when dragging or playing video. Basically you will end up rebooting. I have found no solution for this.
  • With Ubuntu 10.10 the touchpad will not work well. Dragging sends the pointer crazy and right click does not work at all. I found a solution https://bugs.launchpad.net/ubuntu/maverick/+source/linux/+bug/582809/comments/94 but unfortunately now the pointer moves too slowly and increasing the sensitivity does not work.

Advice

Stick with Ubuntu 10.04

The touchpad problems didn’t happen with Ubuntu 10.04 and I’m fairly certain that the screen flickering following a resume didn’t occur either. So if you’re going to install Ubuntu, I’d currently recommend 10.04.

Run Windows 7 (with Ubuntu 10.10 in a box)

This is the option I’ve currently adopted. This way I have no problems with Google Chrome and the npviewer.bin because there’s a 64-bit version of flash. It also has other good effects such as being able to run the latest version of Skype, have my fingerprint reader work for logging in (this is quite a time saver because I tend to use strong passwords). Of course, to get software development done I installed Ubuntu 10.10 with VirtualBox. In this way I have no problems with the touchpad. Running the operating system that the manufacturer intended has certainly caused less headaches (and time wasters). Using VirtualBox seems quite performant and I’m not stuck with a compromise such as Cygwin.

Plea to Canoncial and manufacturers

Perhaps it’s just that 10.10 is a disaster (at least running native/raw on HP hardware) but I can’t help but think that it’s imperative that Canonical find a way to have manufacturers buy into Ubuntu and test/preinstall it on their hardware. There was a time when Dell were doing this at least in the US and EU (but even then only on a small subset of their range). I used to enjoy the days of searching for solutions for hardware problems, diving into configuration files and configuring X etc. I learnt a lot through those experiences. However, now that I’m older I suppose, I value my time more. I hear this argument from Apple fan boys all the time. Unfortunately it’s true. I do think that Linux and Ubuntu in particular is a better software development platform. The weath of software available using APT is a big part of that. Also that APT uses binary packages. Easy software installations isn’t so important if you don’t experiment with new programming languages and libraries etc that often.

Buy a Mac :)

The other option is, of course, to buy a MacBook. Since I already have an iMac in case I need more power, I’ve been thinking about purchasing a 11″ MacBook Air next year. I’ve tested one in-store an it seems quite nimble for such a little beast and the screen resolution is the same as my current laptop – 1366×768. I’d certainly have no more need for my 11.6″ netbook (which won’t run Ubuntu Unity btw because of gma500/poulbo graphics driver issues – sigh!). Perhaps the 11″ wouldn’t cut it for Java development though. I haven’t tried IntelliJ on it in-store yet. A fine but more expensive option is the 13″ MacBook Air. The same resolution as a 15″ MacBook Pro. Currently the 13″ MacBook Air will set up back $2,078.00 including 4G RAM and 3 year warranty. If I had to choose again right now, I’d be picking between 11 and 13 inch MacBook Airs.

Since I won’t be purchasing a new notebook until next year, I am hoping that the rumoured April MacBook Pro update will make the decision easier. Hoping for higher resolution displays like MacBook Air, cheaper flash/ssd storage option, quad-cores, Mac OS X Lion and cheaper 8G RAM option. Hopefully a combination of Apple and a rising AUD can deliver. It’s quite possible that the AUD could come crashing down before then though :(.

Agile is the status quo

November 24, 2010 1 comment

Robert C. Martin (aka Uncle Bob) has written a provocative article, What Killed Waterfall Could Kill Agile. Besides its main trust, it also contains some interesting historical tidbits in the history of the agile movement.

Here’ my 2c. Disclaimer/background: programming since age 11, interested in “big” methods in the 90s, XP since 1999 and became a CSM 2 years ago.

The problem isn’t certification per se. The CSM after all is just a 2 day training course! It’s hard to argue that education is detrimental. There certainly is a problem with what Bob calls “elitism” or (better) authority without responsibility. Perhaps there’s also a problem with how organisations are perceiving the CSM and role of Scrum Master. I haven’t experienced it myself. In my case, I have noted serious scepticism about the usefulness of the CSM. As long as it is merely considered a 2 two day training program then I don’t think it does any harm (it merely does what a 2 day training course can do). No doubt it was marketing genius to make attending a course “qualify” someone for a certificate :). I took the course when I was flush with cash from working in the UK. I attended in order to show my interest in Scrum/XP to potential clients and team mates. I did also hope to learn something at the course :). I did note that the course was full project-management types… to the degree that I felt somewhat out of place – so I think I know where Bob is coming from.

Agile has become a meaningless term. Agile is dying. Everyone is doing agile. The “agile” label is slapped on everything. Once slapped on, it tends to provide a force fields against criticism. Often this is an attempt to get something for nothing (“but you said it would be faster if we had 100% test coverage”) or just simply popularism. One of the worst things about Agile is the unquestioning, unthinking fanboyism that abounds. Agile has become the status quo.

As a young programmer in the 90s I was entranced by “object-oriented analysis and design” and the glittering lights of the 3 amigos – their respective methodologies and their (Rational) Unified Process. However, by the late 90s, it was the fight against bureaucracy that drew me to XP and the little white book. It was the questioning of the status-quo of the “big” methodologies. Giving working code the respect it deserves.

What’s not important is that we overemphasise a word, “agile”, that has already become synonymous with software development or software engineering. What is important is the following:

  1. Work as productively and economically as we know how
  2. Continuously learn in order to hone and master our skills. Yes, you will have to learn new programming languages :). I recommend Haskell, OCaml and Erlang.
  3. As always, keep a sceptical eye out and do not to fall prey to dogma.

Most people fail on that last point. Don’t.

Stonking new laptop

May 22, 2010 4 comments

I’m writing this from my new laptop! Stop the presses: it’s not a Mac! :) In fact, I’m trying out Windows Live Writer to publish this post…

Technical specifications:

HP Pavilion dv6 3042TX
Intel i7-720QM quad-core processor 1.6GHz turbo to 2.8GHz
8G DDR3 SDRAM
15.6" HP BrightView LED display @ 1366×768
ATI Mobility Radeon HD 5650 with 1G DDR3 dedicated graphics memory
640G HDD 5400RPM
Blu-ray ROM
6 cell battery – only around 1.5 hours battery life :(
Windows 7 Home Premium x64

Got it from Officeworks who do a 5% off any advertised price. The latest Clive Peter’s catalogue has it for $1799 – that’s $200 off the RRP. The Clive Peter’s deal also threw in a wireless MS mouse but Officeworks wouldn’t include any bonuses in their price-match. No matter as I have a mouse and Clive Peters have only just had their doors closed by the administrators! The price of the laptop itself was $1709.05 and to that I added an extended warranty to cover me for 3 years at $189, bringing the total price to $1898.05. I noticed that Harvey Norman are offering 16% off all desktops and laptops this weekend so it might be possible to get a slightly better deal from them (saving an additional $30 or so – no idea about their extended warranty though – maybe you’d lose there). The Geekbench score of this thing is as high as 5600.

I also considered the new MacBook Pro 15". Because of the price, it seems only possible to consider the bottom of the range MacBook Pro starting at $2199. On the upside, the cheapest new MacBook Pro 15" is faster than the most expensive older MacBook Pro 17" (according to Geekbench). It’s a dual core i5 2.4GHz machine. I was very disappointed that Apple didn’t make them quad core but I suppose it’s a compromise with battery life – and profit margin ;). Primate Labs lists the Geekbench score of this laptop at 4806 compared to the amazing 5600 that I’m seeing on the 3042TX (according to Geekbench this makes my notebook faster that the most expensive MacBook Pro 17"). The Apple build quality is better but the new HP’s are really getting there. The Mac’s display is more high-res at 1400×900 compared to the HP’s 1366×768. However, it only comes with 4G of RAM by default and a HDD half the size at 320G. Not that it’s really a big deal to me but the MacBook only comes with a 256M graphics card, no Blu-ray and no fingerprint reader. I do miss the vertical screen real estate with the HP but I think it’s a worthwhile compromise. I also miss the MagSafe power port – with the Pavilion you need it connected to the power more often and since the power plug sticks out so far, it’s awkward and relatively easy to get it caught on the lounge/couch/sofa or something. I’ve already got an iMac 27" + 8G of RAM with Snow Leopard so the other upside with this notebook is that I get a copy of Windows 7 should I need to do any .NET development. I’m already taking a look at PowerShell that came preinstalled (many Unix-like aliases are provided but ‘ls’ still looks like a dodgy old ‘DIR’ command – yes, yes – I’m sure there’s heaps of good stuff in there like object-valued pipelines). The extended 3yr warranty for the MacBook is a staggering $579! That would make a total of $2778. If I up-spec the RAM to 8G and the HDD to a 500G 5400rpm (not quite the 640G that I have) and the price leaps to $3,477.99 – very nearly twice as much as what I paid and still no Blu-ray, HDMI out or 1G graphics card… As you can imagine, it is a very difficult price to justify even for the Apple build quality, higher resolution display, battery life and MagSafe power adapter. Don’t worry about the OS, I won’t be using Windows 7 day-to-day. I’ll get all my *nix goodness by installing Ubuntu Lucid Lynx shortly. Then I’ll be able to apt-get all my favourite applications. Apt/dpkg is better than MacPorts – binary packaging is a must for anyone who values their time – something I learned from a year or two with Gentoo prior to making the move to Ubuntu. Also keen to see how OpenSolaris might work out as a notebook OS – all that GNU goodness with ZFS too. I recently heard that FreeBSD has ZFS too so perhaps I should go that way. I do tend to prefer BSD/MIT/X11 over GPL/LGPL.

Bzr uniqueness + Git

August 2, 2009 Leave a comment

The unique thing about Bzr (compared with say Mercurial) seems to be that the community has developed tools for some common workflows.

I’m still using Mercurial for my personal files at home. Since I use Linux as my primary development platform, Git is getting the upper hand for me. I’ll have to give hg2git a try (this will give me the opportunity to finally prune my /Photos directory). The git-svn support is useful when clients are using SVN and you want to work from your laptop. Also the GitHub is pretty cool. I’ve only played around with it but it has paid accounts that could be used for off-site backup and for possibly for source code delivery to clients. I hear that Git works great on Mac but last I heard the support on Windows was still lacking. Git works in cygwin with a native port on the way. I haven’t used Windows for development for a while but always used to install cygwin when I did. However, that’s not necessarily a great solution for regular Windows/.NET guys. If I was doing a .NET project, I’d probably stick with Subversion – git-svn is always there for disconnected development.

I wonder if there are bzr style workflow solutions for Git…

Categories: Programming Tags: , , ,

IBM to buyout Sun Microsystems?

March 19, 2009 5 comments

This story paints a gloomy outlook for Sun Microsystems. This purchase would certainly end the “wars” between IBM and Sun over Java… One has to wonder what it would mean for the future of Java (the language, the platform, everything). At least HotSpot and the class library are open source now.

My understanding is that Microsoft are cashed up in this economic crisis. Plus they’ve even hired Neal Gafter. Microsoft hire a lot of very good guys. With Gafter over at Microsoft, I wonder if that influenced the decision to squash closures for Java… That was the dumbest move for Java. I suppose it doesn’t really matter: for me, Scala is the next Java.

I wonder if businesses will be more likely to adopt .NET rather than Java now though and really turn the tide. This global recession is turning out to be what I call The Greater Depression, some The Second Great Depression and still some other young ‘uns The Great Depression 2.0. I wonder who will come out on top? With ReSharper, Visual Studio is actually pretty good! So, no excuses – go brush up those C# skills! ;)

WebBeans => Java Contexts and Dependency Injection

January 29, 2009 2 comments

I’ve been watching the WebBeans/JSR-299 specification for quite some time. After some discussion on the webbeans mailing list, the name was recently changed to Java Contexts and Dependency Injection. This removes the “dependency” on “Web” part. Since it’s effectively a new component model for Java, it didn’t make sense to restrict it to Web environments. The new name is long and not as catchy … maybe it’ll become known as JCDI.

An updated public draft is now available. Other useful information – particularly the introductory guide – can be found on the Seam Framework wiki.

The specification draws much from Seam and Guice and consequently Gavin King and Bob Lee. Congratulations to all involved in the specification. It’s really worth looking at particularly if you haven’t been using Seam 2 or Guice 2. I find myself particularly drawn to Guice 2. I hope they release it soon :).

Hyperproductive Monadic Programmer for the 21st Century

September 15, 2008 5 comments

I recently attended the “Introduction to Scala” course at Working Mouse. The course was run by Tony Morris with the help of Tom Adams. I had feared that the course would be a introduction to Scala with Haskell-coloured glasses … and it was just that. However, it was just this that made it interesting. I already know Scala at a basic level so a truly introductory course would have offered little. I knew that Tony was into Haskell and on one hand I wanted to come away with an idea of what a monad was and on the other hand I didn’t want to learn Haskell with Scala syntax. Luck would have it that there turned out to be just two attendees – myself and John Ryan-Brown. Tony was able to accelerate through the introductory material with help from Tom Adams. This freed us up to begin working on monads and emulating type-classes in Scala. It was a really wonderful course that I can’t do justice to in this short post. I did come away knowing what a monad was (but now I’m not quite so sure). I did learn Scala through “Haskell glasses” but that was what was really wonderful about the course.

So what are monads? Well it appears to be an “ultimate interface” with 3 special methods – return (also called unit), bind and join (where join can be derived from return and bind). My current understanding is that monads are the “ultimate iterator” but I figured I’m supposed to understand that they are an “abstraction over computation”. This is going to take a while to sink in. Here are the signatures for the 3 special methods:

  return :: Monad m => a -> m a
  bind   :: Monad m => m a -> (a -> m b) -> m b
  join   :: Monad m => m (m a) -> m a

In terms of List, return is cons, bind is flatMap and join is flatten. I wasn’t familiar with flatMap but it’s a more general version of map. Map can be implemented in terms of bind/flatMap and unit/cons.

    List(1, 2, 3) map (n => n + 1)
    List(1, 2, 3) flatMap (n => List(n + 1))

Since then I’ve been learning a little more about Haskell and Category Theory. It’s really great to have a new avenue of things to study. Haskell certainly has come a long way since I looked at it last.

Oh and the title of this post… Well it’s kind of a bad joke from day 3. After 3 days of indoctrination I realised that it was leading to the conclusion that a new breed of programmer was required – the hyper-productive monadic programmer for the 21st century. This new breed of programmer would eschew side effects and even OOP in preference to algebraic data types, type classes, implicits, higher order functions, monads and higher kinds. They would impress their friends with deep knowledge of mathematical principles and have an IQ 50 points above decent developers of today. These programmers would be trained to be 10x more productive than their imperative colleagues (coding in Java and C#) – allowing some of us to retire for a better life (perhaps as an economist or financial advisor). All that remains is to work out how much of this is hyperbole and how much sound.

Follow

Get every new post delivered to your Inbox.