My wife (mostly) and I have started a new blog about our efforts to move back to San Diego. Oh boy!

JJ's avatarSan Diego Homesteaders

Los Angeles is like an old roommate, when you first get together you are super excited about hanging out together and all the adventures you are going to have. As time goes on though, the little things start to annoy you. For some reason, your expectations of how it’s going to go just don’t match up to the reality.

I am really over LA. All the excitement has been overshadowed by the 2 hours in traffic I have to sit in to get there. Since I no longer work in the entertainment industry, there seems little reason to stay. I think the city is annoying me more because now that I work from home, it seems silly to stay.

I think there is a time in your late 20s and early 30s when you realize life is hard and you want to be closer to your family. Why this thought…

View original post 109 more words

FizzBuzz One-Liner

Challenged myself to see if it was possible to do FizzBuzz in one line. The answer: yep!

1
2
# FizzBuzz in one line (minus this comment)
print n.join([%d%s%s % (i, ‘Fizz’*(i%3==0), ‘Buzz’*(i%5==0)) for i in xrange(101)])

Legible Word Scrambling

I was recently reading the Lucky Basartd page on the Stone Brewery website and I remembered an (unverified) study claiming “scrambled words are legible as long as first and last letters are in place.” For grins, I whipped up a Python script to scramble a word/sentence.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

Substrings in C

Sometimes I get frustrated about that things that aren’t included in the C standard libs. Chief among my frustrations: there is no substring function! I know C is bare-bones for a reason, but they couldn’t think to include it in <string.h>?

I also posed this question on Stack Overflow and there was quite a bit of good discussion about substrings in C: 
http://stackoverflow.com/questions/7406219/why-is-substring-not-part-of-the-c-standard-library

So, after a bit of researching I came up with this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38