Jonathan's thoughts about just about anything

Month: September 2012

So, I needed a short break from actual work and I saw a cool experiment done by John Scalzi over at whatever.com and decided I would do the same and show what each letter of the alphabet autocompletes to in Chrome. I do use Firefox as well for a lot of my browsing but I have no good autocomplete there so these are probably not perfect.

a: amazon.com – I do pretty much all my shopping there
b: bitbucket.org – code hosting seems reasonable
c: calendar.google.com – I check my calendar, a lot. I have no idea what I would do without it.
d: docs.google.com – I feel like there are going to be a lot of google websites in here…
e: eecs.umich.edu/~pmchen/eecs482/ – not sure why this is so high up, but it is
f: facebook.com – this does not get that much usage anymore, it did once though
g: google.com – no surprise
h: hulu.com – I do not have a problem, I swear!
i: iphone 5 (after a pause, apparently I do not look at websites starting with i often in chrome)
j: jpevarnek.net – actually not a heavily visited site
k: kuler.adobe.com – a friend showed this to me, it is kind of useful
l: localhost – not that surprising
m: mail.google.com – email is cool
n: nwcal.micirclek.org – this is cool
o: officedepot.com – this probably would not have been here a week ago
p: plus.google.com – more google…
q: qrcode.kaywa.com – I used this kind of recently
r: reader.google.com – the last google link
s: stackoverflow.com – it would be kind of terrible if I was not on this a lot
t: trello.com – this is a really cool todo list site, you should try it
u: umcirclek.org/calendar_bs.php – I like looking at the calendar
v: voice.google.com – oh, forgot about that one
w: whenisgood.net – planning meetings is important, so is checking when people are good
x: xkcd.com – xkcd is awesome!
y: youtube.com – I did not know I looked at videos that often
z: zalman.com – I bought a hard drive case from them a while ago

Working in Linux, we normally have fairly well-made shell programs to work with. Convenient libraries such as GNU readline (http://tiswww.case.edu/php/chet/readline/rltop.html) developers are able to quickly and effortlessly add command history, movement within the line, and all the other nice things we have been taught to expect. Unfortunately, some programs do not do this, something I unfortunately found I would have to deal with while using sqlplus for my databases class this semester. Fortunately, with a little help from google, I was able to find a nice wrapper program that would add the expected readline functionality to any other program! rlwrap (http://utopia.knoware.nl/~hlub/rlwrap/#rlwrap) has so far been an absolute lifesaver and I am reasonably sure it alone will be making this class bearable for me. I have no idea how it works (I will be checking the source code at some point…maybe…) so I am just going to say it uses magic to add the functionality I expect every program to have to the programs that do not have it.

I have been looking at a few coding standards recently and for the most part, I am happy with the Linux kernel coding style (http://www.kernel.org/doc/Documentation/CodingStyle). It has a very nice description of how to code everything in a terse but clear way which is something a lot of other guides lack. There are two items with it though that I definitely do not agree with: the indentation for switch statements and the use of braces in if/else statements.

For switch statements, the coding style recommends having the case statements at the same indentation level as the switch statement (see below)

switch (suffix) {
case a:
break;
default:
break;
}

In my opinion, this is hard to read and the case statements should all be indented by another level (see below)

switch (suffix) {
case a:
break;
default:
break;
}

The style also specifies that curly braces should not be used with conditional statements unless one branch consists of multiple statements. I completely agree with this concept for a single if statement, however, I think it looks a lot cleaner to use braces if there are multiple branches in the if statement. This does not add a significant amount of white space (only a single line thanks to the inline braces), gives a cleaner separation, and prevents people from stupidly adding an extra statement they think is in a branch but really is not. The change I am proposing is below.

if (cond)
action();
else
other_action();

would become

if (cond) {
action();
} else {
other_action();
}

With these two changes (and adaptations for things like classes and other non-C language features), I will be using the Linux Kernel Coding Style as my personal coding style. There are times when I do things wrong (for example, I often do not put spaces around “*” and “/” just because my Engineering 101 professor instructed us not to) but overall this is a nice sound style guide and one I will be happy trying to follow.

I just had a conversation with a friend and I thought it deserved a lot more attention than I was able to give it during the last couple blocks of a car ride. The general idea of the conversation (okay, I am going to distort it a bit here, sorry) was that she could not understand why it was that some people had trouble being outgoing, and I decided to try to explain it. The problem was, I realized quickly enough that I have no idea why I would often choose not to talk to people at an event and just sit by myself (actually, it was far more likely that I would either talk to one other person I knew or try to get some work done despite the social nature of the event).

Eventually, after a couple more blocks of driving, I decided it was probably just my way of looking at potential conversations. For me, most conversations are going to end up becoming awkward within a minute. They will start fine with normal greetings, me asking a question, receiving an answer, possibly the other person asking a question (and me giving an answer if so)…but then they will just stop. Either I have no idea what to say or the other person just seems to not have a real interest in continuing the conversation. This will then either lead to me having to wander away or trying to just find a way to end the conversation. I do not like that conversations tend to end up that way more often than not, but they do and I therefore am always expecting a conversation to end that way. When conversations go better than that, I really do love it (assuming I do not get annoyed with the other person).

Anyways, as was pointed out, this can result in me ignoring meeting new people and possibly not meeting someone who could possibly be my new best friend. I know that failing at a conversation really would not matter and that is why lately I have been trying to force myself to just talk to a lot of people knowing that I am going to hate most of the conversations. I do not accept failure well and setting myself up for so many failures is not an easy task, but it is one that really is worth it. If during an entire week you end up meeting one person you end up liking but end up having awkward conversations with a hundred people you would not have talked to otherwise, you came out ahead.

There is no reason not to just go and talk to people: the worst that could happen is that you end up not being friends with a person you would not have met before while the best that could happen is you make a new friend. Unfortunately, life is not always this simple and emotions force us (i.e. me) to miss out on these opportunities. I wish talking to people was easier but for the moment I guess I am just going to have to accept a lot of failure and hope for that tiny bit of success.