Ok, I really should be doing something else but I'm going to take a moment to give my two cents on this topic:
http://www.codinghorror.com/blog/archives/000994.html
In it Jeff Atwood ponders the move to 64-bits. Apparently he's a bit surprised at the speed at which the 32-bit addressing limit is becoming a problem. Actually I'm surprised it hasn't become a problem sooner.
I seem to remember, back in the old days, when I first started computing, machines came with 4 megs o ram. This was a mac, BTW. Macs were used quite allot for Photoshop and Photoshop demanded stupid amounts of RAM.. I mean you could have 32 or 64 megs of RAM and it still wouldn't be enough.. OMG!
The reason I mention this is because what an average PC user is running is very tiny compared to what people who actually use their machines for RAM intensive things use.
Currently I work on an image viewer program called InteleViewer. The thing is our image viewer likes RAM. I mean, we're viewing large images and we have to remain responsive while downloading the JPEG versions of several thousands images and decompressing them and witting them to disk... oh and did I mention we're using Java.
Yeah, yeah.. Believe me it is possible. What's crazy is we can do this with as little as 200 megs of RAM. It's not super speedy but it's usable.
At any rate, the doctors using our product like speed and will purchase anything to make it faster. Naturally, if they buy a workstation, one of the cheapest upgrades they can do is to buy more RAM. The more RAM then less hard drive swapping our viewer needs to do. Oh!. and if you want to view the stack of images in 3-D you better have enough RAM to fit the whole thing in RAM because we can't do much in the way of swapping when you can be looking at the stack of pixels from any angle.
RAM good. InteleViewer want more RAM!
We started to bump up against this RAM limit thing a while ago.. about the same time Apple was shifting to 64-bits. I can't remember what state we're in when it comes to the java virtual machine but the situation with window vis-a-vis 64 bits is shockingly ridiculous.
A 64-bit OS should not treated as some sort of pro feature. During a transition you want to minimize the pain. 64-bit OSes is a problem, a bug not a *&%$ feature upgrade.
Microsoft's attempt to split their 64-bit OS from their 32-bit OS has probably made the transition more difficult because with fewer 64-bit OSes floating around there's less incentive to make better, more mature drivers.
I'm an extremely gunshy when it comes upgrading so my tendency is to wait quite a long time because getting the new OS. I've only recently upgraded to XP from Windows 2000. I'm a bit cheesed that I'm not going to be able to run yesterday's OS with lots of memory because the transition only became really feasible recently.
At any rat, I'm going to stick with windows XP and 32-bit drivers for as long as I can. Not only does the old stuff tend to be more stable but it also runs faster and uses less of my system resources, which make everything else run faster too. From experience I've found that my idea of "speedy" and "stable" is a bit higher then the average bleeding edger...
Sunday, November 11, 2007
Frustrations, theater etc..
Between rehearsing for the new play I'm in, work and the usual madness of everyday life I've not really had an opportunity to compose anything of note for this space.
That said, I do have a large article (and I mean embarrassingly large article) which goes into how to document code in an effective way. I wrote it because I kept having deja-vu when it came to code comments. The things I wanted to know weren't there and what was commented was completely obvious. I was also getting the vibe from many on the team that code commenting was completely pointless, which was quite obviously bogus since Sun has managed to provide some very decent java doc comments for their code. What I have done is kept track of which things I want to know when I approach new code and put them all into a large document in a check-list sort of form.
The document became rather large when I realized that many of the items in the list only really made sense if you knew how to write good code. As a result I needed to explain how to write the piece of code in a format that doesn't require code comments before getting into what to comment. In fact, many of the items in the list can be thought of as warnings of the form: "Watch out! This code is not written how you think!".
In the end the guide is as much about how to code well as it is about how to document well. It's quite a nice read.
Anyways, that will be coming up as soon as I can figure out how to translate the behemoth into blog form.
Ok, gotta get back to learning my lines. See ya.
That said, I do have a large article (and I mean embarrassingly large article) which goes into how to document code in an effective way. I wrote it because I kept having deja-vu when it came to code comments. The things I wanted to know weren't there and what was commented was completely obvious. I was also getting the vibe from many on the team that code commenting was completely pointless, which was quite obviously bogus since Sun has managed to provide some very decent java doc comments for their code. What I have done is kept track of which things I want to know when I approach new code and put them all into a large document in a check-list sort of form.
The document became rather large when I realized that many of the items in the list only really made sense if you knew how to write good code. As a result I needed to explain how to write the piece of code in a format that doesn't require code comments before getting into what to comment. In fact, many of the items in the list can be thought of as warnings of the form: "Watch out! This code is not written how you think!".
In the end the guide is as much about how to code well as it is about how to document well. It's quite a nice read.
Anyways, that will be coming up as soon as I can figure out how to translate the behemoth into blog form.
Ok, gotta get back to learning my lines. See ya.
Saturday, October 13, 2007
P180 vs PowerMac G4 MDD
For some reason two people I know recently decided to go out and buy a new PC. They decided to get a desktop PC and to have it custom built for them. When you have a PC custom built you need to specify every part like which CPU, motherboard, Video card etc.. It's a whole lot of fun and one can spend days and weeks mulling over benchmarks and spec sheets to.. well.. just to understand Asus' catalog of motherboards. In any case it's alot of fun and at least one of my favorite bloggers has made the argument that it good for programmers (at least) to build their own PC so that they have a deeper understanding of their tools. This is totally ridiculous of course. If it were true I'd feel some need to make use of my VHDL skill and build up my own CPU or plunge back into the world of assembly of C every 5 years... The reason you want to build your own PC (or have it built for you) is because it's fun dammit!.. A very geeky kind of fun but fun non the less.
(I can't bring up custom computer building without mentioning arstechnica's computer buying guide. Every time I've ever made a custom PC I've done the week of so of research and ended up with exactly what arstechnica recommends. Well, disturbingly close anyway.)
At any rate, the point I was getting to was the question of which case to buy came up in conversation. These days it seems impossible to talk about computer cases without mentioning the mighty P180 case from Antec (or the new, updated P182). The Antec P180/P182 is widely thought of as one of the best if not the best case on the market. One of the most important about this case is the designers made quite allot of effort to make it --QUIET--! I own one. It's quite nice. The doors and sides of the thing are made of some sort of sound dampening material. The drives and fans are mounted on vibration dampening mounts.. It's well thought out.
That said, it doesn't *look* very exceptional. The case comes in black and silver. I bought the silver version and I think it looks like a mini fridge with the front door shut. Needing a name for it on the DNS, I called the it "the fridge". Funny eh? no? well never mind then!
anyways.. So the P180 I have is good and all but I can't help but compare it to the PowerMacs G4 MDD case. I mean they sit side by side on the floor next to me so it's hard to resist the urge.

When I first brought the P180 into the house I was impressed at its height. This is a full tower case. Really it's in a whole different class than the MDD since the MDD (MDD stands for mirror door drive just in case you were wondering) is a half height tower or Mini tower as some people call them. The youngens I think call them that. Damn things keep playing in my yard. Get out of my yard you rascals. Wait, I don't have a yard.. never mind.
The PowerMacs G4 MDD is freaking fantastic. To open it you just use the handle on the side and the whole side door comes open like this:

Notice the lack of cables? The cables are all built into the case. They took the time of threading all the big fat IDE cables through the case. I love it. The case has space for 4 hard disks and two optical drives. Putting in new HDs is incredibly easy and you don't have to worry about the big phat IDE cables getting in the way.. did I mention that?
Upgrading the RAM is easy, you just open the door and the slots are laying there in plain view uncluttered by cabling on the open door. Just plunk in RAM and your good to go.
The computer even runs with the door open. It doesn't like it but it runs.
The experience with the P180 much like any other case in this respect. First there's the screws:

Yep, I took a picture of the screws. They can be undone without a screwdriver but, meh, I didn't need to unscrew anything with the mac. It has a handle with a metal latch.
Then you have to slip the big door off like this:

.. just like every other PC case.. booo.
oh and be very, very careful when you do this. The first time I did this I was having trouble getting the door off because the monkey that made my machine put the side panel on such that some of the panel's slotting hook thingies (technical term) were on properly and some of them weren't. The panel was really on there tight.
So what I do is I grabs the front of the case and pulls the side panel with all my might... you know.. the way you do when the door is stuck. BAM! The damn thing exploded in my hand.. bits of the door hinge when flying all over the room. "%^*&(^!" I yells.

(The picture it a view of the front of the case from the top. You can see the optical drive in the right of the image.)
The P180 has a big front door on it. The idea is the big front door covers up the drives and air intakes and such so the sound is muffled. This door is on a double hinge that lets you fold the door out of the way.. The first picture on the blog shows you what the computer looks like with the door folded to its side. Unfortunately the double hinge is a bit weak. If you put pressure on it it breaks into many pieces. (5 actually).
So.. I super glued all the pieces back together.. That didn't work very well.

and sent an email to antec that basically said
"Um.. I broke the door, can you send me a new one of those plastic door hinge bits."
They sent a new door so I'm happy again but I leave you with the warning: "The door hinge on the P180/P182 is weak. Don't apply any pressure on it or you'll break the hinge into 5 pieces!".. That said it looks like Antec will email you a new one free of charge if you or a former friend breaks the door .. presumably within some sort of warranty period that I should now about but haven't bothered to read. :-)
Anyways.. inside the case looks like this:

.. well... it looks like that if you happen to have a computer inside it.
The P180 puts the hard drives in the little removable compartments so mounting them is easier. It's no MDD but it will do..

See the circle thing that looks like a keychain ring? If you undo the screw underneath and if you unhook it and pull the whole thing comes out. Very nice.
Dear Antec,
Please get an old PowerMac G4 MDD and make a case that has the sound dampening of the P180 but the convenient access of the MDD and I will declare it to be the ultimate case.
Sincerely,
me
(I can't bring up custom computer building without mentioning arstechnica's computer buying guide. Every time I've ever made a custom PC I've done the week of so of research and ended up with exactly what arstechnica recommends. Well, disturbingly close anyway.)
At any rate, the point I was getting to was the question of which case to buy came up in conversation. These days it seems impossible to talk about computer cases without mentioning the mighty P180 case from Antec (or the new, updated P182). The Antec P180/P182 is widely thought of as one of the best if not the best case on the market. One of the most important about this case is the designers made quite allot of effort to make it --QUIET--! I own one. It's quite nice. The doors and sides of the thing are made of some sort of sound dampening material. The drives and fans are mounted on vibration dampening mounts.. It's well thought out.
That said, it doesn't *look* very exceptional. The case comes in black and silver. I bought the silver version and I think it looks like a mini fridge with the front door shut. Needing a name for it on the DNS, I called the it "the fridge". Funny eh? no? well never mind then!
anyways.. So the P180 I have is good and all but I can't help but compare it to the PowerMacs G4 MDD case. I mean they sit side by side on the floor next to me so it's hard to resist the urge.

When I first brought the P180 into the house I was impressed at its height. This is a full tower case. Really it's in a whole different class than the MDD since the MDD (MDD stands for mirror door drive just in case you were wondering) is a half height tower or Mini tower as some people call them. The youngens I think call them that. Damn things keep playing in my yard. Get out of my yard you rascals. Wait, I don't have a yard.. never mind.
The PowerMacs G4 MDD is freaking fantastic. To open it you just use the handle on the side and the whole side door comes open like this:

Notice the lack of cables? The cables are all built into the case. They took the time of threading all the big fat IDE cables through the case. I love it. The case has space for 4 hard disks and two optical drives. Putting in new HDs is incredibly easy and you don't have to worry about the big phat IDE cables getting in the way.. did I mention that?
Upgrading the RAM is easy, you just open the door and the slots are laying there in plain view uncluttered by cabling on the open door. Just plunk in RAM and your good to go.
The computer even runs with the door open. It doesn't like it but it runs.
The experience with the P180 much like any other case in this respect. First there's the screws:

Yep, I took a picture of the screws. They can be undone without a screwdriver but, meh, I didn't need to unscrew anything with the mac. It has a handle with a metal latch.
Then you have to slip the big door off like this:

.. just like every other PC case.. booo.
oh and be very, very careful when you do this. The first time I did this I was having trouble getting the door off because the monkey that made my machine put the side panel on such that some of the panel's slotting hook thingies (technical term) were on properly and some of them weren't. The panel was really on there tight.
So what I do is I grabs the front of the case and pulls the side panel with all my might... you know.. the way you do when the door is stuck. BAM! The damn thing exploded in my hand.. bits of the door hinge when flying all over the room. "%^*&(^!" I yells.

(The picture it a view of the front of the case from the top. You can see the optical drive in the right of the image.)
The P180 has a big front door on it. The idea is the big front door covers up the drives and air intakes and such so the sound is muffled. This door is on a double hinge that lets you fold the door out of the way.. The first picture on the blog shows you what the computer looks like with the door folded to its side. Unfortunately the double hinge is a bit weak. If you put pressure on it it breaks into many pieces. (5 actually).
So.. I super glued all the pieces back together.. That didn't work very well.

and sent an email to antec that basically said
"Um.. I broke the door, can you send me a new one of those plastic door hinge bits."
They sent a new door so I'm happy again but I leave you with the warning: "The door hinge on the P180/P182 is weak. Don't apply any pressure on it or you'll break the hinge into 5 pieces!".. That said it looks like Antec will email you a new one free of charge if you or a former friend breaks the door .. presumably within some sort of warranty period that I should now about but haven't bothered to read. :-)
Anyways.. inside the case looks like this:

.. well... it looks like that if you happen to have a computer inside it.
The P180 puts the hard drives in the little removable compartments so mounting them is easier. It's no MDD but it will do..

See the circle thing that looks like a keychain ring? If you undo the screw underneath and if you unhook it and pull the whole thing comes out. Very nice.
Dear Antec,
Please get an old PowerMac G4 MDD and make a case that has the sound dampening of the P180 but the convenient access of the MDD and I will declare it to be the ultimate case.
Sincerely,
me
Tuesday, October 2, 2007
Yeah yeah we know.
If you have an opportunity to get feedback never dismiss it.
Getting feedback from customers is never straight forward. The most important thing, I believe, is that you only get a fraction of the feedback you think you're getting.
When it comes to quantity of user feedback I generally operate on a rule which I discovered while writing Myster. The rule is, you won't get feedback unless your app doesn't run.
This is an exaggeration and simplifications, but it's there to underline a point. Customers don't exist to provide you with feedback so when they feel compelled to give you feedback it usually because they've found something that makes them yell. It can be because you app doesn't work at all, it could be that you've taken away something someone had based their work flow on, and it could be because your app is missing some capability that's vital for its continued existence in that firm.
Now, just because someone isn't yelling at you, doesn't mean that you're product isn't bad. Clients/users don't give feedback if the problem is not large enough to trigger a strong enough emotional reaction to bother complaining about. If your customers are used to dancing bearware then they aren't going to report things that aren't really, really broken. If you're customers are used to something really refined and you suddenly make a big mistake and disable or remove something they really liked then you'll get feedback. In one case your program really sucks so you'd expect to get lots of feedback on where it's broken.. In the other case your program fulfills their needs even with the change and you're still getting angry feedback. This happens because feedback is triggered based on the emotional reaction of events.
There exist some companies that use only customer feedback to guide their development efforts. These companies are usually fairly successful with this strategy however this represents a minimum level of competence. As someone who wants to present the best possible piece of software you need to be more proactive. Solicit feedback wherever possible. Find time to just sit and watch your client working on your software. There are really big gains possible for software that really fits the client needs. If you're software doesn't convert your user base into a heard of zealots there's still room for improvements. :-)
Before I leave this topic i want to point out something. The more "advanced" your users the more likely they are to feel confident to give you feedback. For example, if you're product is aimed at the technical community you can expect to get alot more feedback per user than if you're aiming at the consumer space. Also, users that try out your product early tend to be of the more adventurous type and will also tend to give you lots of feedback as well. Be aware that as your product matures your user base will naturally tend to shift to more casual users (and the user base will get used to your product's quirks) so feedback starts to dissipate later in that product's cycle.
ok see ya.
Getting feedback from customers is never straight forward. The most important thing, I believe, is that you only get a fraction of the feedback you think you're getting.
When it comes to quantity of user feedback I generally operate on a rule which I discovered while writing Myster. The rule is, you won't get feedback unless your app doesn't run.
This is an exaggeration and simplifications, but it's there to underline a point. Customers don't exist to provide you with feedback so when they feel compelled to give you feedback it usually because they've found something that makes them yell. It can be because you app doesn't work at all, it could be that you've taken away something someone had based their work flow on, and it could be because your app is missing some capability that's vital for its continued existence in that firm.
Now, just because someone isn't yelling at you, doesn't mean that you're product isn't bad. Clients/users don't give feedback if the problem is not large enough to trigger a strong enough emotional reaction to bother complaining about. If your customers are used to dancing bearware then they aren't going to report things that aren't really, really broken. If you're customers are used to something really refined and you suddenly make a big mistake and disable or remove something they really liked then you'll get feedback. In one case your program really sucks so you'd expect to get lots of feedback on where it's broken.. In the other case your program fulfills their needs even with the change and you're still getting angry feedback. This happens because feedback is triggered based on the emotional reaction of events.
There exist some companies that use only customer feedback to guide their development efforts. These companies are usually fairly successful with this strategy however this represents a minimum level of competence. As someone who wants to present the best possible piece of software you need to be more proactive. Solicit feedback wherever possible. Find time to just sit and watch your client working on your software. There are really big gains possible for software that really fits the client needs. If you're software doesn't convert your user base into a heard of zealots there's still room for improvements. :-)
Before I leave this topic i want to point out something. The more "advanced" your users the more likely they are to feel confident to give you feedback. For example, if you're product is aimed at the technical community you can expect to get alot more feedback per user than if you're aiming at the consumer space. Also, users that try out your product early tend to be of the more adventurous type and will also tend to give you lots of feedback as well. Be aware that as your product matures your user base will naturally tend to shift to more casual users (and the user base will get used to your product's quirks) so feedback starts to dissipate later in that product's cycle.
ok see ya.
Friday, September 28, 2007
The Linux loop
I'm using X but something does work.
Use Y
I am using Y but something different doesn't work.
Use Z
I am using Z but something else doesn't work.
Use X
etc...
Use Y
I am using Y but something different doesn't work.
Use Z
I am using Z but something else doesn't work.
Use X
etc...
Wednesday, September 26, 2007
Data and type safety.
What's the difference between :
and
?
For that matter what's the difference between:
and
?
What is the point of creating an class for an object that contains one piece of data? Well...
In languages with a compiler enforced typing system, like java, it's good practice to leverage the type system wherever possible. Creating types for things like paths or ids can prove very useful. By using the type system the compiler will help you catch more errors earlier. This make the code easier to write and maintain.
When should we create a class for a type? If you look at InteleViewer's code base, we don't always substitute implicit types (of the form "int id") with explicit types (of the form "ImageId id"). The main reason is that sometimes it doesn't give us anything and the class can add a layer of bureaucracy that just serves to make the code more complex.
There's really a set of cases that determine how important/useful it is to turn an implicit type into an explicit type.
Cases:
- You have a 1 variable primitive type in which all values possible for the primitive value are allowed values for the implicit type but you don't do anything that actually needs to rely on the type.
You generally don't need to worry about this case unless your app is getting confusing enough that you want to use the compiler to check your code.
- You have a 1 variable primitive type in which all values possible for the primitive value are allowed values for the implicit type and you are often doing operations on it (formating, funky math etc..)
If you're doing operations on it (especially operations that take an object of the same type as a parameter. Like addition, for example.) then *always* make a class for that type. Dates are fairly good examples of this. They have a mapping to longs but we generally want to manipulate them in respect to each other. File objects are another good example (I think every value String more or less makes sense as a path).
- You have a 1 variable primitive type but there are some values that are valid for the primitive type but not valid for the implicit type.
I generally make a class for this if the value escapes from the object/code module it's in. The reason is that things can get dangerous across module boundaries.
You generally want to defend against badly formated implicit types across functional boundaries so that errors are caught early. Having an explicit type guarantees that the data you're getting as a param is well formed.
- You have a 2 (or more) variable implicit type.
Always make a class for this case.
Oh, one last thing.. Always make your data types immutable if at all possible. See ya.
String path = ...
and
File path = ...
?
For that matter what's the difference between:
int imageId = ...
and
ImageId imageId = ...
?
What is the point of creating an class for an object that contains one piece of data? Well...
In languages with a compiler enforced typing system, like java, it's good practice to leverage the type system wherever possible. Creating types for things like paths or ids can prove very useful. By using the type system the compiler will help you catch more errors earlier. This make the code easier to write and maintain.
When should we create a class for a type? If you look at InteleViewer's code base, we don't always substitute implicit types (of the form "int id") with explicit types (of the form "ImageId id"). The main reason is that sometimes it doesn't give us anything and the class can add a layer of bureaucracy that just serves to make the code more complex.
There's really a set of cases that determine how important/useful it is to turn an implicit type into an explicit type.
Cases:
- You have a 1 variable primitive type in which all values possible for the primitive value are allowed values for the implicit type but you don't do anything that actually needs to rely on the type.
You generally don't need to worry about this case unless your app is getting confusing enough that you want to use the compiler to check your code.
- You have a 1 variable primitive type in which all values possible for the primitive value are allowed values for the implicit type and you are often doing operations on it (formating, funky math etc..)
If you're doing operations on it (especially operations that take an object of the same type as a parameter. Like addition, for example.) then *always* make a class for that type. Dates are fairly good examples of this. They have a mapping to longs but we generally want to manipulate them in respect to each other. File objects are another good example (I think every value String more or less makes sense as a path).
- You have a 1 variable primitive type but there are some values that are valid for the primitive type but not valid for the implicit type.
I generally make a class for this if the value escapes from the object/code module it's in. The reason is that things can get dangerous across module boundaries.
You generally want to defend against badly formated implicit types across functional boundaries so that errors are caught early. Having an explicit type guarantees that the data you're getting as a param is well formed.
- You have a 2 (or more) variable implicit type.
Always make a class for this case.
Oh, one last thing.. Always make your data types immutable if at all possible. See ya.
Sunday, September 23, 2007
Amazon vs Amazon. A catfight.. to the death!
The dollar (US) to dollar (CN) parity has been quite an interesting development recently. Unfortunately it means that Canadian resellers (like amazon.ca) are in danger of being over-run by more aggressive competitors like amazon.com. Consider these prices differences:
For
The Age of Turbulence, Alan Greenspan's latest literary masterpiece, is (at this writing) 26.46 CDN and only 20.99 USD
The story is much the same with DVDs too. Take, for example the BBC's fascinating documentary series on the life and times of other species throughout the universe, Doctor Who. The third series is 87.49 CDN at amazon.ca and only 69.99 USD at amazon.com.
With the Canadian dollar and US dollar parity how are Canadian resellers like amazon.ca going to compete with US resellers like amazon.com? While some might argue that this is only a short term inbalence and that the laws of economics will take care of things, I suspect otherwise! I would suggest massive, arbitrary government intervention to help Canadian resellers maintain their high prices.
P.S.: I am not a crackpot.
For
The Age of Turbulence, Alan Greenspan's latest literary masterpiece, is (at this writing) 26.46 CDN and only 20.99 USD
The story is much the same with DVDs too. Take, for example the BBC's fascinating documentary series on the life and times of other species throughout the universe, Doctor Who. The third series is 87.49 CDN at amazon.ca and only 69.99 USD at amazon.com.
With the Canadian dollar and US dollar parity how are Canadian resellers like amazon.ca going to compete with US resellers like amazon.com? While some might argue that this is only a short term inbalence and that the laws of economics will take care of things, I suspect otherwise! I would suggest massive, arbitrary government intervention to help Canadian resellers maintain their high prices.
P.S.: I am not a crackpot.
Subscribe to:
Posts (Atom)