Author: William

Missing indexes in Oracle

Some little details cause trouble entirely disproportionate to their importance. One such thing is a little quirk in how Oracle handles indexes. I have some code which gets a list of tables using a particular criteria and then gets all of the indexes associated with those tables. Under normal circumstances, the code works fine. However, when testing in a clean database, it will completely fail to find any of the associated indexes, even though they’ve been verified to exist. …or have they? It turns out that when the corresponding table does not contain any data, the index may still be associated with the table but it doesn’t really exist. So when you run a query like this: select * from dba_indexes ind join dba_segments s on ind.index_name=s.segment_name where ind.table_name=’MYTABLE’ It returns no results. Cue confusion. Adding a row to the table causes the index to actually be created and allows my script to start working correctly. Share on...

Read More

Being Matt

When I first started working as a developer over seven years ago, it was a bit overwhelming. Not only had I never worked as a programmer or used any of the languages I’d now need, I also had to get used to a lot of internal tools and processes that often had minimal documentation. It was, in a word, exhausting. Matt was another developer on the team who had already been with the company for half a year, and he was really good at his job. He wasn’t officially my mentor, but he encouraged me to ask questions. I had him as my code reviewer for my first major piece of development, and let’s just say he had a LOT of comments – everything from functional improvements to changes in variable names. It was frustrating, to say the least – but also educational. Having Matt review my code was a great way to learn what good code should look like, and as time went on I would actively seek to have him as my code reviewer whenever I was working on something particularly complicated; having Matt look at my code gave me more confidence that everything was correct. Matt recently passed away from cancer; one of my regrets is that I never got to know him socially. We had several shared interests, but I just haven’t made a practice...

Read More

Introduction to Foster Care

I’m going to go a little off-topic for this blog today and talk about something that’s not technology related but is important to me: foster care. My wife and I have been certified foster parents for several years now, and I find that there are a number of common misconceptions about what foster care is and how it works. What is foster care? Foster care is a way to provide homes and families for children who, for whatever reason, do not have parents who are able to care for them. Sometimes that means no living parents or parents who are currently unable to care for children; other times, this is children who have been removed from their homes due to abuse or neglect. Generally foster care is intended to be a short term solution until the children can be reunited with family members – if not their parents, then other relatives who would be willing to adopt. The actual length of “short term” may vary – children may be in the foster care system for days or years. There are approximately 400,000 children in foster care in the United States, including nearly 7,000 in Wisconsin. Who can be a foster parent? To be a foster parent, you must be at least 21 years old, have sufficient income to cover your own needs, have sufficient room in your home for...

Read More

Parsing doubles in Finland

One problem I had this week is that a piece of code which had, for the previous few years, been perfectly behaved suddenly started crashing for a new customer. This was the first time I’d seen the code run on a Finnish system, so a problem with internationalization seemed like the obvious place to start. Running the software on a fi-fi system, I found that a call to Double.Parse was causing a FormatException: Input string was not in the correct format. The issue here was that the code was attempting to parse a string which contained a software version number, e.g., “2005.100”. In a US English environment, this works fine – that gets parsed as 2005.1. In a German environment, this works fine – that gets parsed as 2005,100. Finnish, however, doesn’t use the period as either a decimal separator or a thousands separator, so when the system tried to parse the string, it didn’t recognize it as a number. The solution is to pass in the second parameter for Parse, which (at least in C#) is an IFormatProvider. When no IFormatProvider is given, the system defaults to InstalledUICulture, which means it was trying to interpret the string according to the system’s locale settings. By passing in InvariantCulture, I force it to ignore the locale settings and interpret the input as an English (no country) string. Double.Parse(version, CultureInfo.InvariantCulture) As...

Read More

On work, burnout, and recovery

A while back, I was asked what I would change about my job. My answer was that I would like to have more vacation time. In other words…what I would like to have for my job…is less of it. The funny thing is, I like my job. It’s consistently challenging. I have to do and learn new things all the time. The hours are semi-flexible, the dress code is practically non-existent, and the cafeteria is a major perk. All that – and it’s still easy to get burned out. I’ve been in the same job for seven years, now. There have been a few title changes – software developer to software developer II to senior software developer – the people are different, the languages are mostly different..but I’m still programming. Now, I like programming – I like technology in general – but I’ve never done the same thing for so long. I get bored and want to move on to something else. So why not move on from programming? A big part of it is the money, of course – being a software developer pays really well. I’m getting older and I have a family to support, which makes jumping around harder. On top of that, this is something that I CAN do long-term – there are new challenging all the time, which is what makes it interesting. And...

Read More