I C# People…

October 23, 2009

I can be sooo childish and unprofessional sometimes…

Filed under: General — Neil Barnwell @ 10:56 am

…but I can’t help myself.  Read on.

Sent to 700+ people in "CC":

Good Morning
On behalf of [the recruitment company I work for] I would like to apologise for the email you may or may not have received yesterday evening. The email was comprised by a trainee resourcer, who has subsequently been reprimanded. The email was not sent to as many individuals as it may appear as it was cancelled in progress, but some of you may have received the mail none the less. Please again accept my sincerest apologies but rest assured the trainee, who I will not name for her own sake, has certainly been sufficiently reprimanded.
Should you wish to air your grievances further, I will be happy to speak to you
Apologies again
[Name removed]

I replied to 500 people in "BCC" (couldn’t just leave it alone, could I?):

Hi [Name removed],

Many thanks for the notice, however I would like to point out that while I personally did not receive the email you mention, I’m disappointed that you have now sent my email address to everyone on this mailing list.  This is a privacy concern for me given the nature of your business and the fact that I do not recall directly registering with your agency, and I would appreciate it if you and your colleagues would use the "BCC" field in future bulk correspondence of this nature.

Warm regards,

Neil.

Replied just to me:

Who actually gives a flyin fuck who u r..u muppet..
1. U wernt even important enough to include in the email
2. email addresses are as easyily avaiblable as your boyfriend
3. So many things 1 cud say.. Try your best to carve sum sort of life out for yourself .. You foockin looser.. Neil

Sent from my iPhone

I replied (childishly BCC’ing those 500 again – sorry):

I am sure no-one cares who I am, I would just like to minimise the spam email I get, and care for the privacy of my personal information.  I am very sorry to have offended you.  I will take your advice and strive to become a better person.  I aspire to walk in your very footsteps.  With you as my inspiration, I am confident that with determination, good fortune and a strong stomach, I will achieve my goal.

Best wishes, and may your farts forever smell of roses,

Neil Barnwell.

September 2, 2009

Shadow copies? More like “phantom” copies…

Filed under: General — Neil Barnwell @ 4:45 pm

I’ve just run into a strange issue.  It’s the end of the day so I’ll leave it for tomorrow to work it out.

I have some code that is reading a config file, but when I open the file in TextPad, I see different values than my application does.  I checked it with Notepad.  Notepad agrees with my application, TextPad shows something else.

So I’ll tackle this in the morning, but it is pretty weird.  I think it might be a shadow copy issue (I’m running Vista).

Interesting times.

February 24, 2009

My Ego is Bigger than your Ego

Filed under: Building Applications, General — Tags: , , , — Neil Barnwell @ 7:24 pm

There’s no doubt that ego plays a part in software development.  We’re all in competition with each other.  Not just for work, but in terms of “geek points”.  I am unashamedly egotistical when it comes to software development.  I love to point out how clever I am and tell people about this crappy wonderful little class I just wrote, or how I found a bug in so-and-so’s code that made a really big issue go away.  I can say this safe in the knowledge that I probably cause as many problems as I fix.  I know that never a day goes by when one of my colleagues in either this or a past life comes across some code I wrote and sighs quietly to themselves before taking a sip of a caffeine-infused drink and “refactoring” it.

Much as I’d like to be, I’m not the world’s greatest software developer.

I am, however, a geek.  This is where the competition and virtual chest thumping really comes from.

There are loads of ways to earn geek points.  Having a blog is one way but a bit obvious.  Better is to use Twitter or FriendFeed.  How about an account on StackOverflow.com?  You might have an iPhone* or contribute to an open source project.  Hell, you might even have a “There’s no place like 127.0.0.1” t-shirt in a different colour for each day of the week.  You should also use the word grok a lot.

An ego in software development, like competition in any other area, is a good and healthy thing.  It’s what drives us to create something better, cooler, faster, more reliable than our peers.  Developers love nothing more than to write software for developers.  I believe this is both because we are writing it for ourselves, but also because we know that other developers are the only people who will really grok (+1 point) what we’ve done, and appreciate what it took to get there.  Other developers are the ones that will spot the bits where the mouse pointer didn’t turn to a wait cursor.  They’ll notice if your app becomes unresponsive and suggest clever things like multithreading and BackgroundWorkers.  You respond by saying “yeah, this is just the first version – that’s all part of the plan”.  We want our peers to say things like “Dude, that is so cool”.

This attitude isn’t necessarily what our employers are looking for, however.  There are those out there that can afford to let developers experiment, of course (Google is probably the best known for this), but most companies need to earn money.  They’re not interested in your implementation of Castle Windsor or ASP.NET MVC, and will struggle to be sympathetic with your reasoning.  “Because it’s so cool” doesn’t cut it.

Also, when you have multiple egos in a team, it can be mildly unproductive.  Software developers are intelligent people for the most part but that in itself can be the problem.  Put some together in a room and most will have their own variation on the solution.  At some point someone needs to step up and say “Okay, that’s all great stuff, and we’re going to do it like this…”.  Bear in mind that this doesn’t have to be the right solution.  Software and opinions can be changed.  You just need an agreed spokesperson or lead to make the decision so you can break the tie and each get back on with developing.  Of course, secretly knowing you had the best idea all along…

* And for bonus points you should have a 2G *and* a 3G version.

February 3, 2009

GTD – Outliners for thoughts

Filed under: General, Off-topic — Tags: , , , — Neil Barnwell @ 11:08 pm

I think in trees.  I relate almost everything in one way or another in terms of some sort of hierarchy.  Trees and hierarchies feel elegant to me, and it shows in the way I make notes.  It’s really a more orderly way of displaying a mind-map.

I’ve always made my notes in a standard A4 notebook.  Meeting notes for me look something like this:

Outline Notes

Outline Notes

The trouble is written notes is that they aren’t typically very editable.

It occurred to me that computers are pretty good at this sort of thing, so I looked for a software outliner.  I tried a few desktop software options including Dave Winer’s opml Editor, and the supremely awful free version of NoteCase. but quickly decided that the web was the way to go.

I’ve used Evernote, but it was actually too complex for my needs.  It focusses on each note being like a rich text document.  I want the tree structure to *be* the notes, just like in my A4 book.  It does have tagging though which would be nice in the future when I have many notes.

I’ve tried various mind-mapping options, but the outliner tree style is much easier for me than a sprawling spiders web with the ideas on.  They’re really the same thing, just laid out differently.

Todoist was good, and one of my final two choices.  They have the indenting support, but in the end it was keyboard navigation that let it down.  You *can* move things around with the keyboard, but it wasn’t quite as slick as my final choice: Checkvist.

Despite a few teethinc troubles (a friend of mine lost a document because of a bug) it is very, *very* fast to add, edit and manouvre items around the tree.  The keyboard support is excellent, and there are very few actual features to bog it down.  It’s a simple, clean interface that feels and works like an editable notepad.  I might actually break my habit of “no laptops in meetings” to take electronic meeting notes…

January 27, 2009

Nobody builds bridges any more!

Filed under: General — Tags: , — Neil Barnwell @ 10:50 pm

Once upon a time we had this thing we call the Industrial Revolution.  We did amazing things during this time.  We built steam engines, railways, bridges and canals.  These were massive projects that took years of blood, sweat and tears.  In the 20th century we had what some call the second industrial revolution.  The automotive industry appeared and began to thrive, information technology appeared and began to grow.

Watt Steam Engine

Watt Steam Engine

That was the revolution.  Since then there’s been some evolution of those existing ideas, but relatively few new genuinely ones.

No-one is building those fantastic railways and the amazing bridges that took them over seemingly impassable territory.

Why?

It could be funding, but where did the money come from in the old days?  Do we no longer have men like Brunel who will put everything on the line and strive to make these things happen?

Have we had the next revolution already?  If so what will the next iteration look like?  Will we even have one?  Are we instead going to maintain the current gentle evolution from one new idea to the next.  Assembly, C, C++, Java, .NET, JSP, ASP.NET, (N)Hibernate, ASP.NET MVC, jQuery and so on.   Building blocks built on building blocks.  Walls taken down, put up a different way.  An organic system where the latest trends flow and follow the current thinking the way a shoal of fish move together in the sea.

Computers as we know them appeared first with valves, then transistors, and progressed to microchips.  Then the microchips started getting smaller and faster.  But still microchips.  Now, I’m only 27, but I’m not convinced that computers have really fundamentally changed in the past 20 years or so.

In terms of software, the main operating systems as we know them today, and the companies that built them, were the last revolution.  We as software developers are really just building new trains to run on that old railway.  There’ll come a limit to what we can do, so while that’s a little way off, what’s the next “big leap” to take us onto greater things?  Let’s build a new railway that’ll cross new cravasses and take us new places.  Who’s the Brunel of our time?

January 20, 2009

Tip for debugging console applications in C#

Filed under: C#, Design, General — Tags: , , , , — Neil Barnwell @ 9:22 pm

Sometimes in a C# console application, you want to output text to the console window for release builds, meaning Debug.WriteLine() is out of the question.  Maybe you also want the output in some sort of log file?  It would also be handy to be able to indent the output to make it clearer what your application is doing.  This makes simple Console.WriteLine() impractical, too.

If it’s an enterprise application you’d probably look at Log4Net or similar, but if it’s just a little something you’ve knocked up, then that might be overkill so try this at the start of your application:

Trace.Listeners.Add(new TextWriterTraceListener(Console.Out));

The documentation for Trace and Debug gives more detail, but the great thing with this approach is you can now format your logging output in a more clear way:

Trace.WriteLine("Starting loop...");
Trace.Indent();
foreach (string name in names)
{
	Trace.WriteLine(name);
}
Trace.Unindent();
Trace.WriteLine("Completed loop");

Like I said, I’m not proposing it as best practice for large-scale production systems, but for those occasions when you need to see into your application without debugging it, it might prove useful.

January 13, 2009

Undo, UNDO!

Filed under: General — Tags: , , — Neil Barnwell @ 11:20 pm

There is little more frustrating when using a computer than message boxes.  Technical people ignore them because we think we know they don’t mean anything, and non-technical people just use a rule of thumb (always yes or always cancel).  No-one ever reads the small print.

There’s not much point asking users if they’re sure before letting them do something. They will be absolutely positively sure.  Until shortly after they’ve actually done it.  Instead, we should accept that users make mistakes.  Rather than blame them for blindly clicking OK on our message boxes, we should embrace the human condition and strive to try and provide rollback with *all* functions in our applications.

Instead of

“Are you sure you want to book 3000 items of stock in?”

try

“3000 items of stock booked in.” and offer CTRL+Z to simply remove those 3000 items again instantly.

This is a hard thing to get people to come round to.  It’s so ingrained to rely on confirmation *before* the action.  Maybe we should be more forgiving and provide a means to recover from their mistakes, rather than having them hit our call centre in a panic when something goes wrong?

UPDATE:

Note that I’m not saying you should never use messageboxes.  I’m just suggesting that the “Are you sure?” concept in particular be avoided.

January 6, 2009

Synergy

Filed under: General — Tags: , , — Neil Barnwell @ 11:18 pm

For a short while I had two PCs on the go – my old development laptop, and my shiny new desktop PC.

To ease the transition period and be able to use both PCs at once with one keyboard and mouse, I installed Synergy.  Similar to multi-monitor setups, this uses the network and a kind of remote-access solution to control the mouse and keyboard input of other machines.

One tip, if you find that you’ve set it up according to the documentation but find that the mouse moves to the slave machine and won’t move back, check that you’ve set up *both* directions of movement on both machines involved.

I.e:

  • Rule 1: Laptop is to the left of Desktop
  • Rule 2: Desktop is to the right of Laptop

This caught me out and took a while to find the cause of the mouse getting stuck on the secondary screen.  Hope the tip helps someone :) .

May 27, 2008

Facebook’ll see your FriendFeed, and raise you…

Filed under: General — Tags: — Neil Barnwell @ 8:30 am

http://blog.facebook.com/blog.php?post=17720842130

Facebook now does FriendFeed.  They’re doing the same things, so now it’s down to the implementation…

May 9, 2008

Afraid to Upgrade?

Filed under: General — Tags: , — Neil Barnwell @ 8:42 am

I have often found that when I’ve written a funky new piece of functionality, that replaces or augments existing functionality, that people aren’t often eager to use it. Often this is because they are used to the way it works, for better or for worse, and prefer the devil they know. In addition, loads of new features isn’t what everyone wants, and contrary to popular (developer) belief, people aren’t going to dive into all the new configuration options you’ve added.

So are people scared of change? I think they are, myself included. I think there are two reasons people resist change.

Reason number 1

I believe change can put people outside their comfort zone. I’ve experienced it – upgrading to Vista, installing those new graphic card drivers, starting a new job. It’s not unfounded, either. The reason I’m always worried about it is because when it comes to computers, I get burned all the time.

In the context of computing, it’s fair to say that PCs do burn us all the time, it’s probably only reasonable to expect people to be wary and prefer to stick to what they know. It’s worrying to think that we as developers are basically at fault, too. If our software worked faultlessly all the time, people would always want the new version, and wouldn’t worry that it might make things worse.

Reason number 2

Often the reason to not change isn’t because things will get worse for them, but because it takes effort to change, and there’s no compelling reason or tangible benefit to do so. Hands up those who are still using Windows XP or Office 2000/2003? I assume I don’t stand alone?

It’s why when I write software I try to make some perceivable change for the user. Users don’t really care about a minutely better algorithm or better error handling. They care that it does what they want, without being too complicated. Any PC has a job to do, and if it does it already, why change that?

Cost is another factor. Essentially, for an upgrade to be worth it, the following must be true:

cost * effort < perceived benefit

It’s exactly why there are still so many IS400 machines out there running EGA terminals doing back-office applications. It works, people know how to use it, they’ve learned the quirks, it hasn’t changed since 1990, and it does the job. So why bother?

A solution?

Automatic updates is one way to push new software out there. It’s a good way of making sure that people get the bugfixes they didn’t know about even though they’re in the “reason 2″ category.

You have to be careful not to push things that don’t work though. For example, I wasted an hour or so yesterday trying to get AVG Free to update from version 7 to version 8. Although it had been asking me for a week or so to do so (via an annoying popup that I couldn’t disable – how dare they!), it screwed up. I ended up having to delete the Program Files\Grisoft folder and registry entries and hoping a clean install worked.

Fortunately for me, this time I got it working, but how is my situation better than it was before? I have virus protection (sort of) now, and I did before. Where’s the benefit? Was it worth it?

Older Posts »

Blog at WordPress.com.