Oh wow did someone really say something bad about TDD … I mean what could be bad about this latest fad ;-)
So testing your code is of course a good thing. Anything these days to help us write better code is a good thing but definitely in moderation. I’d say with all the work going into TDD and I’ll later explain my thoughts on DDD, people are once again on the search for the holy grail of software engineering. It doesn’t exist, get over it – software engineers are artisans by definition and that is because our skill is extremely creative and you can’t wrap it up in a process to make it perfect.
What bothers me with TDD is the amount of effort being placed on “passing the test”. It is one thing to make your code easier to test but a totally different thing to engineer your entire application, just so it can be tested. Is your client paying you $$ per hour to have something that can be tested or something that works?
What about dependency injection. A hot subject for allowing the injection of mock objects or testable objects into code. My question is, if you inject a mock object into a test – is the test really real? Now inversion of control has its place, like most patterns, but I warn you against thinking you’ll now have perfect code if every class is instantiated through an IoC container.
So when it comes to application architecture I urge you to use some common sense. Pick patterns that solve problems you really have. A lot of code can be tested just fine without DI. A facade is often simpler for centralized code. Here are the general rules I would suggest to keep you on track:
- Build an application that meets the requirements first!
- Make sure it performs and scales well.
- Make it easier to test! but not a requirement if it means major architectural changes.
- If you can’t automate your test, like many user interfaces – use a person, they’re called QAEs!
You don’t have to like it but too many developers forget what the point of the code is to start with. Not to pass tests but to do something cool :)
Yeah I guess the title sums this up. Reminds me of how ridiculous it was when VS 2008 was launched and wouldn’t run on Vista …
I tried to get this up on Windows 7 RC1 and it installed fine but when it loads the screen doesn’t paint correctly. After a few clicks I just get the frame of the IDE and nothing else … freaking joy.
I _might_ be related to running in a virtual machine but either way it should work otherwise I’ll be stuck with VS 2008 for quite some time.
edit: I knew this would come back to bite me, no point hiding it. The readme has the solution about vmware 3d acceleration issues. Turn it off and you’re good – not a great solution but still a solution. I’m not sure who is to blame for the issue.
Well here you go, right from the horses mouth.
Netflix for media center
I mean it has only been 2 years since the unsupported version of this plugin was released so right in line for MS to finally connect the damn dots.
Hopefully this version is more stable than vmcNetFlix which was ok but never really stable and I suspect they were stealing login information but anyway … that aside nice to have this now since with multiple xbox extenders I refuse to have more than one gold account I can now stream netflix movies all over the place :)
So I wanted to post a little about the things I’ve found now working with Cocoa and the application I chose to target first was an iPhone application. I haven’t really had much time to dig into a native mac application yet.
Firstly lets talk a little about XCode. This great IDE comes free when you own a mac – pretty cool. Unlike Visual Studio which must be purchased if you want anything besides the free version. XCode is a great IDE, it is fast and simple enough to use. Apple has included everything you need including performance and memory profiling tools.
The extensions to support iPhone development are totally seamless so that was a nice find. Once I started getting into objective-c I thought my eyes were going to bleed :) Really, it is too old. The future is with managed languages and the thought of any form of memory management is pretty lame but right now, I have no choice. If you want an iPhone application you’re going to be using obj-c.
The language did have a couple positive points, at least what I’ve discovered so far. The way it passes around messages is a cool idea. Parameters are named when passing values to a method. (msg) – this makes for more coding but it makes it a hell of a lot easier to read the code later.
I did like Apple’s take on controller and view separation. Even using a separate tool for the interface design is a great way to keep the UI developer out the controller code. Up until Microsoft released the new ASP.NET MVC framework all views and code behind files were tied together. Unfortunately for traditional ASP.NET and WinForm development this is still true.
So right now I’m impressed and enjoying the development process. I think Microsoft could learn a few things from Apple however …. I do feel strongly that Apple need to connect the dots and that their code needs to move to a managed environment. They could adopt Ruby more rather than just supplying the API bridge.
Just a little something here that I’ve noticed especially on my macbookpro which I routinely overload. I used to always have a browser window open with my gmail in it. Turns out GMail puts a lot of load on the browser process, way too much to just have it open all the time. I’ve noticed this in FireFox 3 on the mac for the most part.
Since I’ve had plenty of issues with FF on the mac it may just be that. Safari 4 beta seems much better but still, it generates too much load. I can imagine it is busy checking for mail and other things but it is not really an acceptable back ground process.
Of course on my workstation who cares … 8 cores can deal with it :)
We certainly do have a lot of choices when building applications these days! :) Here is a little insight into my latest project application choice. It might or might not work for you and it is not intended to be a guide per se since as good programmers know – pick what makes sense for your application.
I needed a new web application that was only going to be used for internal administration and so I could do something fun and not care about how it scales. Here are a couple key requirements so we can discuss over them. Firstly, I need page authentication and I have no need for a database since I’ll use SimpleDB so the DAL isn’t as important.
My initial thought was, lets just roll with Rails since in the last couple months I’ve been doing a lot of R&D using Ruby and Rails however I recently started some work on Grails and so the decisions begin.
Let me prefix first by saying I could have built this using .NET MVC and I believe that would have been the fastest way, sorry but it is – that isn’t bias for Microsoft just a fact especially since my skills lie heavily in that area … but I wanted something more fun :)
ASP.NET MVC
- Easy to use for sure, especially if you’re already a .NET developer.
- Tools are fantastic.
- Authentication is as simple as using the [Authorize] decoration on your controllers.
- Data is via an existing SimpleDB Provider I wrote.
- Doesn’t run well on anything but IIS
- No exposure to other technologies <- the fun part :)
Ruby on Rails
- I think Ruby is pretty easy to learn.
- The tools are getting better – don’t be a hero, use and IDE like NetBeans/Eclipse.
- If you have complex database requirements activerecord is going to be painful for you.
- I’ve found the community a bit broken with Rails, you can generally get help but not always the easiest to understand.
- Far too many depreciated gems floating around and even the Rails wiki is out of date.
- As for authentication, well nothing easy to find – does require more code than I’d like. Not sure what is best.
- SimpleDB access was OK but not great, relative name spaces break when importing classes while using Amazon libraries so that wasn’t cool. Had to hard code some paths.
Grails
- Just started R&D on this and I didn’t feel like jumping into Groovy although it is close to Ruby I’d rather learn one new thing at a time.
- Does have the huge benefit of running on the JVM and also being able to use existing java classes.
- Can be deployed on well established application servers, so that is great.
- Tools are ok, new at this stage but Netbeans seems to do the job.
- Authentication is ok, there is a good plugin but still requires far too much code for my liking compared to .NET
- I can’t find a Grails/Groovy SimpleDB library but there is one for Java so I guess I can just use that.
and then I found ….
JRuby
- Will allow me to keep on the learning curve with Ruby but
- Lets me deploy in single packages and do java application containers.
- Exposes me to more java technology.
- Tools are pretty good and I’m using NetBeans right now.
So that kinda sealed the deal. I wanted something fun and like Ruby so JRuby lets me keep that knowledge but also I get better exposure to Java technologies. You might wonder, “If you want Java exposure why not use JSP or similiar” … right, no thanks :) Keep it simple!.
I’ll post when I’ve deployed my first working JRuby application and I plan to run it on Tomcat/Ubuntu 9x.
To be fair to Rim I thought the store would be a disaster, hard to use or just clunky but it wasn’t. I had an iphone for awhile and I can say that it basically works the same way. Of course you don’t get any of the “cool” applications since Rim believe they know better and that business users don’t want accelorometers or anything groovy in their phones.
The biggest problem is stability of the phone once you start using applications from the store. It basically sucks – even just running 3-4 applications caused the phone to become extremely slow and within a few days unstable until it reboots or I reboot it.
Apple don’t allow applications to run in the background, for good reason! Rim of course, knowing better – let you do this and it kills the device. I tried using just a single application and closing it down when done but the load speed is too slow. Leaving just this single (weather) app running makes the phone un-usable. Who is to blame … not sure – might be a crappy application but I never had a bad iphone app kill my phone so I blame Rim :)
So right now, I give it a 5 out of 10 – nice to get some useful applications for once but hardly worth the effort since the phone is now dog slow. I was testing this on the Bold (9000) with .247 software package.
Have you seen Microsoft’s latest campaign? I call it, “We’re good when you’re poor”. It started with a speech by Balmer (twit?) about how Apple’s sales have fallen during the bad economy and that Microsoft sales were going up.
Wow, I couldn’t believe my ears. They’re actually touting that their OS is great now that the economy sucks rather than, we built something better. What is really sad is that Windows 7 is going to be great, really great – yet they decide instead to go out Apple bashing. A game they can only lose.
I’ve also seen posts on the Windows blog site along with TV commercials about finding a “Computer that fits your needs” but for under $1000 … duh – of course nobody can then pick a Mac and Microsoft make out as if this is a good comparison. Maybe for monkeys…. that is like giving someone $10k to buy a car and then saying, well they picked a Kia – must be better than a BMW.
*clap* *clap* ….
And no, not because it sux :) I like it, it works well and does handle massive numbers of files with good compression.
The story goes as follows – after using some form of Winzip since the dawn of time I decided I’d like to do my bit and buy my own license. I mean it is just $30 (or was!) and so off I went happy to have my own license.
Well that was on Winzip 10 and after some security updates, they now have version 12 out. So what is the problem? They suck, not the software – the idiots running the company. I can no longer download version 10 of the software that I OWN. If I want a download I’m forced to upgrade to version 12, which isn’t going to happen. If you can’t make money as a company, squeezing it out of existing clients is a really bad business model. This coupled with the fact I get spammed by Winzip and 3rd party crap really grinds my gears. (ref: FG) <- duh
So, I’m now going to “attempt” the same thing with WinRar – buy a license and go on my merry way. I doubt those guys will be as quick to try screw me over. As for Winzip, you guys can kiss my ass.
Oh .. you think you already know? :) Read on….
It may seem quick and easy to just pick your next Apple Mac up directly from their website but many people don’t know you can get a much better deal by buying through a reseller such as Amazon. Not only are their prices better but currently Amazon are offering rebates which can save you a few hundred $$.
I thought I’d list out my hardware and directl purchase links for those who are interested. Let me start with the laptop, a must have at least for your first Mac purchase. There is a slightly cheaper version of this but I’d pay for the extra memory and speed – This link is the MacBook Pro 15″, 4 GB of Memory.
After that I decided that since I run a lot of virtual machines a laptop is never really going to be enough so I then went for a Mac Pro, the 8x Core XEON beauty and then added 10 GB of memory. Some of this was not purchased from Apple since their cost for memory and drives isn’t acceptable. I did still buy premium stuff and certified to work on those machines.
That workstation is definately the way to go. I can run 3-4 powerful virtual machines with several gigs of assigned memory with no performance lose what-so-ever! Not the cheapest setup in the world but definately a great working system.