TechBlog
leaflet
#js1k entry finally complete - AsciiBrot1K:http://urlm.in/flii - from T-SQL to JavaScript and then down to just 1KB of hand-compressed code

Over-Commented Code

Posted on 27 June, 2006 by maximinus in Rant
So maybe I find code of many forms easier to understand than some people.  But whether I do or not, I find that some people have the tendency to oversaturate their code with pointless comments - like this one from some sample code written by my Java tutor:
if(menuSelection.equals("Create")) { // sent by the 'create' menu item
Now, if that isn't redundant commenting of perfectly self-documenting code, I don't know what is.  Anybody who can't decipher that line of code should not be touching any code written in any language.  That line is practically the epitome of self-documenting, readable code - if you can't read it, you're certainly not qualified to be touching any Java code (and almost certainly not any type of code).

Edit: Here's another gem I've spotted:
WriteDataBaseToDisk();  // write it to disk
Here we have a comment which is *less* informative/descriptive than the code.  What is this "it" that we are writing to disk?  This was by no means the only such uninformative comment...
Currently feeling: Annoyed
Currently listening to: Nirvana - About a Girl
Currently reading: Java assignment code
No comments have been posted on this entry. Click here to post a comment.

Spam in a can

Posted on 25 May, 2006 by maximinus in Rant
One more type of spam that annoys me: multiply-forwarded messages.

These can take one of two forms (or a combination of both):
  • "forward this to x people or y will happen"
  • joke / funny story / funny pictures
The first kind has absolutely no merit whatsoever, and only serves to either piss people off, or, if it's sent to morons or paranoid people, cause ever-increasing numbers of the message to be flooded around the 'net.

The second kind is alright, so long as it's actually funny.

The biggest problem I have with both of these types of message is the "multiple-forward" / "chain mail" part.  This is because nobody ever thinks to remove the headers from the previous forwards, so:
  • in order to get to the actual content (if you can call it that) it becomes necessary to scroll through several large batches of message headers
  • more importantly, this is a security risk.
To expand on the second point, it is essentially just giving my email address (and that of anyone else it's been sent to) to everyone else that it gets sent to after the generation that I was sent it in.  If one of these messages happened to get into the hands of somebody who wanted to send more intrusive spam, they would now have access to potentially hundreds or thousands of known-good email addresses.  All it takes is one person to send it to a spammer, or one person to sell the list to a spammer.  Even if no spammer gets hold of it, many people whom I probably don't know are going to receive my email address.  Any of these people can then contact me or sign me up for spammy newsletters, or do whatever else they like with my email address.

Why do these people find it necessary to forward crap to me?  I don't mind the occasional joke etc, so long as it's funny, but the chain mail "forward or die" type messages are just stupid and a waste of resources.  If you are going to forward a joke email (or, heaven forbid, a "forward or die" message) - at least remove the headers from all the previous forwards, and USE BCC.  BCC is there for a reason - so you don't go giving everyone's addresses to everyone else.  Send it to yourself, with the list of people you want to forward to in the BCC field.  It only takes a few seconds to remove all the headers from the message body, and even less time to type your own address in the "to" field and use the BCC field for all the other addresses.
No comments have been posted on this entry. Click here to post a comment.

I AM2 late...

Posted on 24 May, 2006 by maximinus in Rant
'Scuse the bad pun, I'm just a little peeved at the moment.

On Thursday last week, in the evening, my desktop PC died.  After extensive checking and fiddling, I came to the conclusion that the motherboard seems to have died.  L3 started on Friday evening, so on Friday I tried my best to source a new CPU, PSU and some new RAM (wasn't 100% sure which had died, so thought I'd nail all three, since it had to be one of them or the motherboard, which I already had a replacement for).

First, I tried Dragon, since they have a city branch at which I could have grabbed the stuff on Saturday.  Their website, even after updating, still showed stock of the CPU and RAM at the city branch, and the PSU at both other branches.  I emailed them, asking them to hold the stuff for me.  I got a reply, saying that they don't hold the Athlon64 X2 4200+ in stock, that it has to be ordered in and that it wouldn't be in until the following week (this week).  I asked about the 3800+ and 4400+, both of which were also showing as in stock.  Once again, I was told they don't keep them in stock.  Then, I was informed that they didn't have any of the RAM either - despite the site showing 10 the previous night, and 3 that morning (at the city branch alone).  However, I was told that they had multiple units of the PSU - despite the site only showing them at other branches.

So, I rang TasTech.  I asked if he had any 4200+es, and he said no, he doesn't keep them on hand - but that he could get one pretty quickly.  I asked how soon (this was at midday) and he said 3pm.  THREE PM.  That's 3 hours, folks.  I said it sounded good, and I'd be there on Saturday to get it.  He said to drop him an email to confirm; so I did - and also asked about the PSU and RAM.  He then replied later, saying that the 4200+ that was listed as available wasn't actually available, so I ended up having to shell out another couple of hundred for a 4400+.  At 2:30pm, he said he'd be able to get the CPU and PSU in (he had the RAM) by 4:30 - TWO HOURS.  A two-hour turnaround.  Compared to Dragon's dismissive "next week" and not actually even offering to get one, that's bloody amazing.

So, come Saturday, Mike gave me a lift to go and pick up the stuff (thanks, Mike).  We got held up by roadworks completely blocking New Brighton Road.  Once we got there, everything went smoothly.  I got back to L3, and assembled the PC.

I had been planning an upgrade for a while - buying in dribs and drabs as parts were available cheaply and I had money.  I was intending to hold off buying the CPU until after AMD's new Socket AM2 was released, since that meant that Socket 939 CPUs were almost guaranteed to fall in price.  So here we are, four days after my foreced emergency upgrade - and today Socket AM2 was released.  Despite the lack of availability of Socket AM2 in NZ as yet, Skt939 prices are already falling - the 3800+, 4200+, 4600+ and 4800+ have all dropped by varying amounts.

So, thanks to the precise timing of my motherboard's demise, I was forced to shell out more than intended, a fair bit sooner than intended, just to have a working machine.  Understandably, I'm not too happy, especially since AM2 was released but 6 days after the motherboard died, and 4 days after I bought the new gear.
Currently feeling: Poor
No comments have been posted on this entry. Click here to post a comment.

Telcos...

Posted on 28 March, 2006 by maximinus in Rant
Well, now that Telecom NZ are releasing their new 3.5Mbit/512Kbit plans on the first of April, Telstra have decided to get in on the act and are making available 10Mbit/2Mbit plans with decent caps* - $140/mo for 80GB, which is much better than any comparable Telecom plan (data cap-wise).

This sounds all very well and dandy, BUT when they laid their fibreoptic network around Christchurch, they came right up to the end of my street - but didn't come up it, despite there being two schools on the stree - one of them directly oppsite my house.  So, I'm stuck with crappy Telecom ADSL plans.

* Decent as far as caps go - they're bloody stupid no matter how big (well, ok, maybe there should be a limit to how much you can use on these super-fast plans... but Telecom caps are absolutely and utterly pathetic).
No comments have been posted on this entry. Click here to post a comment.

Stupid Support

Posted on 8 February, 2006 by maximinus in Rant
So, I got called around to my auntie's place to set up her new ADSL connection.

I got the modem out of the box, plugged it in, set it up and we were away... No, wait, we were getting authentication failures.  I got her to retype her password to make sure it was correct; it was.  I suspected that Xtra hadn't activated her account for ADSL access, so I got her to ring tech support and ask them.  She asked straight away if the account had been activated for broadband, and the guy ignored her, launching right into his off-the-sheet generic step-by-step idiot's guide to walking an idiot through setting up ADSL that he'd been provided, so she handed over to me.

He started walking me through pointless steps:
"Click on the 'start' button at the bottom of your screen"
*blabber senselessly for 5 seconds*
"Ok, now click 'run'"
*blabber senselessly for 10 seconds*
"Ok, now type 'cmd'"
*blabber senselessly for 15 seconds*
"Ok, now click ok... and you should get a DOS window.  Now type 'ip--"
"LOOK, I've got it connected, got it configured, we're just getting authentication failures.  The first thing I want to know is if the username has been activated for ADSL..." I cut in, completely fed up with his treating me like somebody who's using a computer for the first time and his persistant attempts at making me do pointless things and refusal to answer my question.

After asking for the username, being unable to find the username in the system and having to 'try to find it another way' - then making sure I had the right capitalisation and had added in their absurd username suffix ".xadsl" - he EVENTUALLY came back to me with "Oh, the .xadsl form of the username hasn't been activated yet.  I'll just do that for you now."

So, after a long wait to get through to tech support, and several attempts at getting him to check if it had been activated he finally discovered that it was exactly what I suspected from the get-go.  Unfortunately, it took until I got pissed off and cut him off mid-instruction to knock his tiny brain off the tracks of his instruction sheet he seemed to be thoroughly glued to before he would even check what I was suggesting - totally wasting not only his time and my time, but also the time of whoever was next in the tech support queue.

My advice to any company hiring staff for tech support roles: Make sure they have an IQ greater than their shoe size; that they know how to use their initiative and can recognise users with technical knowledge; and that they themselves have more knowledge in the field than the majority of the people they will be helping.
No comments have been posted on this entry. Click here to post a comment.

Summertime Skiing

Posted on 3 February, 2006 by maximinus in Rant
So, today at work I was asked to see if there was anything wrong with a site.  It had been reporting steadily decreasing amounts of visitors since about July last year.

So, I have a look at the stats myself - and see that they are indeed showing declining visitor numbers.  So I look back a little further, to this time last year - only to find that the number of visitors then was also low - but built up to a peak around June/July, then started tapering off again.

Why could this be?  Perhaps because it's about SKI ACCOMMODATION IN NEW ZEALAND?  Did nobody think that perhaps NOBODY wants ski accommodation in summer, as it's a very season-dependant thing to be wanting, in a country like New Zealand?

Sigh.
No comments have been posted on this entry. Click here to post a comment.

Web Design Woes

Posted on 30 December, 2005 by maximinus in JavaScript, Web design, Rant
So, I'm sitting here working on the long-overdue next version of BLISS, the blogging engine which powers Rant of the Day, and I am, as per usual, battling to try to make things cross-browser compatible.

This time, however, through a cruel twist of fate, it's not IE which is 'misbehaving' as such - this time, it's the only browser which supports CSS which lets me do what I want. This is because MS have extended CSS to do these things - but they either haven't reccomended them for inclusion in the official CSS spec (thus allowing for cross-browser support) or they have, but too late to make a current CSS spec.

I can't even seem to find any nifty JavaScript snippets or anything that'll do the job instead. It seems that truncation other than at a set number of characters is just one of those things which is near-impossible.
No comments have been posted on this entry. Click here to post a comment.

Stupid Systems

Posted on 18 August, 2005 by maximinus in Rant, Interface design
Why do major organisations use such stupid systems? Why do they never seem to be thought out properly?

Yesterday, I went to get my learner's license. I got there after 4pm, and as such was told that I would have to come back as their system doesn't allow times after 4pm. So I went back this morning, look tee test, and then had to wait for nearly 15 mins to get my temporary license, because their system is so limited that it only allows specific times to be entered - presumably only quarter hours. This fiasco meant that I arrived late for the first lecture of the day, though I didn't miss much.

If their system had been thought out properly before it was created, they would be able to cut the crap and issue the temporary license when the test is passed rather than a random amount of time after, and would also be able to keep issuing licenses (at least learners' licenses) until just before they close for the night, rather than having an hour and a half where they have to tell people to bugger off and come back some other day - and I would have had my temp license yesterday and not been late for class.

Also, when the woman took my bag to put it behind the counter, she didn't first make me place any cellphones etc in it, so I had my phone, pda and mp3 player on me during the test... And she found it so heavy that she dragged it along the desk, nearly pulling out the glass panel in the top of the desk, then at the end had to bring it around the counter to give it back... Good thing I only brought the textbook for one of the two classes with me today, I suppose...
No comments have been posted on this entry. Click here to post a comment.
Page 2 of 2 « Newest | < Newer | Older > | Oldest »