Keeping Passwords II

18 years, 6 months ago
[ Geek ]

So it’s been about a week since I started trying out KeePass and it’s done. I’m sold and now using it fulltime.

This is one of those problem spaces that I’ve kept saying ‘someone must have solved this in a decent way already’ and as confusing as it sounds it’s taken me years to find an app I’m happy with. Sure there’s proprietary apps out there but I don’t like the idea of locking my passwords up in a commercial app so finding something open source was key.

Anyway, for what it’s worth, KeePass has my endorsement. I also never thought I’d make use of features like password generation but I am. The copy to clipboard features are plain slick. While I have yet to play around with it, the auto-type feature is…well I’m out of words, is awesome still a cool word?

How Do You Access Your Variables?

18 years, 6 months ago
[ Software Development ]

A warning to the non-technical, this is going to get technical.

While I’m sure they weren’t the first language to do so, C# made properties first class supported constructs and I thank them for it daily. Previously, or currently in other languages, this was often accomplished through accessor methods, typically named something like GetValue(). You can then protect your variable, or add more logic, through this technique. If you’re lost at this point then try this and this.

l was asked today “do you find it weird to use a public property to access something from inside the class where that property exists?” To elaborate, and take it one step further, in example. We have a class named Person. We have a private integer variable in the Person class named _bodyHair and, well I’ll leave it to your imagination what we’re storing in that variable. You’re writing some code in the Person class, if you had to access that private variable _bodyHair how would you do it?

Would you access the variable directly or would you create, and use a property, or accessor method? In the early stages of a class, accessing the variable directly is simplest and most obvious. It may even seem a tad bonkers to create an essentially empty private property and add the performance overhead of the added calls.

I do just that almost 100% of the time. Why? My primary reason for doing anything is that I’ve been burned by not doing it a lot in the past. In this case I’ve been burned by accessing a variable directly and then down the road having a bug related to it’s return values. Something like null being returned when we want -1. So I refactor the class, add a property containing that logic. I’m then left refactoring all references to that variable over to the new accessor property. Annoying but not a big deal.

Burn #2. I’ve spent days, possibly weeks, chasing down a particular species of bug. It’s a simple one. A developer accesses a variable directly instead of through it’s property. In the above example, doing so allows that null value to trickle up the chain and get it’s nose into business a -1 wouldn’t have. Not a big deal, just lost time.

Let’s get crazy and contemplate if there’s a way to reduce the odds of generating a bug like this again? I realize this isn’t anyone’s job and we’re probably messing with the very fabric of corporate software development but humour me. The problem is accessing a private variable directly in the class you’re working in. It’s easy to miss the fact that a private property for that variable exists and thus miss the logic you need. There’s no way to make a variable extra private to prevent access from anywhere outside of your property. Typically the rule is to go ahead and access the variable directly unless a property has been defined. It’s the float in that rule that allows for the burn #2 bug.

So why not just move all access to properties? Doing so eliminates, or at least reduces, the chances of human error. I have been doing this myself for years. I rarely, if ever, access a variable directly even within the class it exists. I use properties for almost all variable access. This makes it simple to add any required access related logic down the road as well as greatly reducing the risk of a relatively common bug. It does introduce a potential performance issue in the added calls and means more code. I tend to err on the side of simple code and reducing the chances of bugs. Am I nuts??

Back to the Farm

18 years, 6 months ago
[ Office Gossip ]

People often ask about the way we work(edit to remove dead link). Some are actually curious, some just need a small-talk topic. Working at home, surrounded by your family all day, no commuting, no boss except your clients, etc. People tend to speak about, and view, this model as being new. I think of it as old.

Within my family, my parent’s generation was the first to leave the farm. Both my father and mother grew up on working farms in the Maritimes. They were surrounded by their families all day, didn’t commute, and had no boss except their clients. As well, they stayed within their communities, spending their days there, living there, eating there, etc. They kept all their energy within a certain geographical area instead of commuting elsewhere to spend their time and money.

I’ve always felt commuting will eventually be viewed as a failed experiment. To me, we’ve been dabbling in the past century with a new model based around commuting. The way I’m able to work today is really a step backwards to a model that’s existed far longer than todays. I think we’re seeing the beginnings of undoing a mistake we made. It may take a few more decades still but I think our larger companies will eventually come ‘back to the farm’ as well.

Keeping Passwords

18 years, 6 months ago
[ General ]

I’ve been using some simple translation techniques to manage passwords that I’m forced to change on a regular basis. As well, I have the beginnings of an application I wrote to store my passwords. As with anything I’d much rather use something already written than building something from scratch but to this point I’ve never found anything I’ve been willing to use fulltime.

I’ve been testing KeePass and I think I like it. It has every feature I could want plus a few I hadn’t thought of AND it’s open source. Why does it matter to me if it’s open source? Basically I know it either has a future through it’s main developer keeping it moving. If that isn’t the case then someone else can take it over or I can manage it myself. I don’t have to worry about a company closing up shop or jacking up fees etc.

Open Source and Security

18 years, 6 months ago
[ Software Development ]

To be honest I have no clue whether this guy actually knows what he’s talking about but I think it makes sense from where I sit…

“As a cryptography and computer security expert, I have never understood the current fuss about the open source software movement. In the cryptography world, we consider open source necessary for good security; we have for decades. Public security is always more secure than proprietary security. It’s true for cryptographic algorithms, security protocols, and security source code. For us, open source isn’t just a business model; it’s smart engineering practice.”

Flipping The Funnel

18 years, 6 months ago
[ General ]

I returned today from a few days off. A few meaning barely three days, not a real vacation by any means. Even in that small amount of time I managed to accumulate enough emails to require several hours of culling and triaging. Ah yes, the promise of the digital world where we’re all optimized and empowered by the digital communication tools at hand.

funnel.JPGI hate to piss on anyone’s parade with my seemingly luddite rants but this sucks. All we’ve done is flip the funnel. In communications, the burden used to be on the sender. You had to write a letter, buy a stamp, walk to the post office, or at the very least pick up the phone. If I didn’t answer you had to leave a message or try calling back. It made you think twice about what it was you were communicating because it took time out of your day to do so. The result being that you performed more triage on your end. Ah, maybe I don’t need to talk to him about that, or maybe I’ll just mention it when we see each other next month?

Now that we’ve flipped the funnel and made it too easy to send communications, the sender has little to no burden. Send, send, send, cc, bcc away and let the receiver to the filtering. This same problem exists in digital photography. In the olden days, you had to take your film in, drop it off for processing, pick it up, and most importantly pay for it. With digital photography, you no longer have to worry about whether you’ve got the right shot. Shoot it ten times and worry about it later. Well when’s later? All that filtering, editing, and processing is now flipped as you accumulate thousands of digital pictures you have to ‘go through’ some day.

Maybe I should start charging ten cents to the sender for every email I read through?

Open Office

18 years, 6 months ago
[ Geek ]

Jaimie recently gave Open Office a shot. My 2 cents? I’ve been using OO since back in their 0.x days, well over 4 years. More importantly I haven’t used Microsoft Office in all those years. As I work for myself I’d have to shell out the hundreds of bucks for that MS Office license to use it legitimately.

I started using OO back at MKS with the thought it’d be interesting to test out but I’d still have to use MS Office. Within a few months I realized that was the case as I never opened MS Office. I have yet to miss MS Office.

Batteries

18 years, 6 months ago
[ Geek ]

Am I the only one who’s laptop battery just plain gave up on me? I thought we were having a grand relationship. I charged it fully, let it drain fully, charged it fully, I thought I was being the ideal battery user person. I’m at the point now where my battery lasts 20 minutes on a full charge if I’m lucky. While I appreciate the emails from people concerned my battery could explode, I seriously doubt this thing has the power to light LED’s little on start a fire.battery.JPG

Options? Pay the man $170 for a new one, and yes in this context dell is the man. Another somewhat viable option is this generic battery for $50. It’s clunky at 3.5 lbs but has some nice features including the claim it can be charged 1000 times.

The biggest negative is that it doesn’t physically fit into the laptop so it’s far from ideal. As well, as it’s going through the laptop’s AC input, my machine won’t know when the battery’s about to die leaving me open to data loss. I can get around this by using my original fully charged battery as my failsafe. That’d give me a full 10 to 20 minutes to save my important solitaire game after the generic battery died.

It’s cumbersome but at least I could go back to working at the park the odd day.

VS.NET JavaScript Debugging

18 years, 6 months ago
[ Geek ]

I haven’t had the chance to test this yet but if it’s for real then I agree it is huge. The ability to actually debug JavaScript code, who’d a thought?

Java, Land of Nouns

18 years, 6 months ago
[ Software Development ]

An interesting rant on object oriented programming in java, bordering on an attach actually. It was a good read, however, I think the story/metaphor went a bit far as I found myself forgetting what we were talking about as I went through it. Some quotes I liked:

  • advocating Object-Oriented Programming is like advocating Pants-Oriented Clothing
  • I’ve really come around to what Perl folks were telling me 8 or 9 years ago: “Dude, not everything is an object.”

If you read the article, make sure to read through some of the comments, ignoring the pat-on-the-back ‘great post’ ones of course.