Previous 10

Oct. 5th, 2014

In the beginning

My first programming language was some variant of BASIC on a VTech Precomputer 2000. Then one day I discovered that a copy of QBasic was included with DOS and began using it to program. I wrote software to add and subtract arbitrarily long strings of integers (I don't think I added support for floating point), software that would perform long division of polynomials, and software that would graph my math homework. One day while a friend and I were goofing around with some code, his dad happened to look over our shoulders and said "You know, you should put that block of code in a subroutine." We didn't know what that was but after a few minutes saw its utility as our code became more modular.

When we were 16, that same friend and I decided to create software with a brand: Freesoft. Our slogan was "Freesoft for the common man". My friend used a font editor to identify the horizontal lines for the letter 'f' in a fancy font and programmed that as a rasterized image that would display at the start of our software...even playing a tune he created! My software usually involved algorithms and math while his software was usually games, including a multiplayer version of Nibbles (or Snake, as it's usually called) and a simple two-player Scorched Earth-style ballistics/physics game. We also created a website to host our software using Xoom web hosting and created multiple email pseudonyms for ourselves using the free Juno email service. We thought we were pretty cool.

Now, 14 years later, my mom was gearing up for a garage sale and I found an old 3.5" floppy disk. It's labeled in my finest handwriting with the following list:

  • QBASIC
  • Fontmaker
  • Iconmaker
  • Freesoft programs
  • FirstBASIC

QBASIC ruined my brain for several years, creating patterns of thinking that were difficult to change when I tried to learn other programming languages. Thank goodness I did or I would still be spinning my wheels trying to use Envelop Basic, XBasic, and RapidQ.

Even so, I'm going to try recovering that old software. I want to see what my code looked like back then.

Sep. 25th, 2014

Caller ID blocking options

I've been considering asking my company to drop my work cell phone plan and pay for my personal cell phone plan. Some people might cringe to be more accessible to their company but work already calls my personal phone all the time. Therefore, the biggest concern I have about doing this is that I sometimes have to interface with outside people who don't need my personal cell phone number.

I can give out my desk number and have that forward to my personal cell phone but if I return a call I need my personal number hidden and there just don't seem to be options for doing this systematically. Sure, you can find apps in the Google Play store but they all appear to be designed with the assumption that you're blocking or changing your caller ID number because you want to be a douchebag to people. What I've yet to see is a setting or an app that simply dials *67 on outgoing phone calls if certain rules are met. I imagine it would work with a blacklist/whitelist option:

  • Blacklist version: Only dial *67 if the contact is in a specific category in your address book, like "Work".
  • Whitelist version: Always dial *67 unless the contact is in your address book and is not in a specific category in your address book.

I've seen articles suggesting that more and more businesses are supporting a bring-your-own-device model, but I'm not finding apps or settings that would support my use case. Does anyone have app or search keyword suggestions? Searching "spoof caller id" simply turns up apps advertising that you can "Find out if your ex is ignoring you! Confuse your friends! Get through to someone really important!" which is not my goal here.

Update: I finally found the right search term: "android auto dial prefix". This led me to Prefixer, which appears to be exactly what I want. The free version allows you to configure a single rule but I think that'll be sufficient.

Sep. 21st, 2014

The Debris Cathedral

For a very long time I've been writing code at my job that automates some very tedious tasks. It's not Python code, though! It's a macro language that has saved the company a lot of time and energy but suffers from severe limitations:

  • No scoping -- everything is in a global namespace.
  • No functions -- the entire language is based on keywords.
  • Incomplete support for lists -- the list can be defined but its length cannot later be checked.
  • Incomplete support for including code from other source files -- the included file will run from top to bottom and exit.
  • Inconsistent ordinal and cardinal numbering -- list indices start with '0', but string indices start with '1'.
  • Insufficient variable quantity and size limits -- one maximum quantity, for instance, is '9'.
  • GOTO.

A couple of years back I inherited some code and ran with it, but now I'm bumping up against these limits on a regular basis so I've had to get creative. Did you ever see Apollo 13? You know the scene where they gather scientists and engineers in a room, dump out a bunch of junk on the table, and tell the team "Make an oxygen filter"? I did that with this language.

I picked up INCLUDE in one hand and GOTO in the other and stared at the global namespace and decided "I'm going to emulate functions in a namespace." Now I'm able to call code in other files using this syntax:

callsub = 'namespace:function'
INCLUDE 'subroutine'

The integer size limits were truncating calculations so (really heavy sigh) I wrote code that adds two hexadecimal strings of arbitrary length, thus avoiding integers entirely. That's something I did for fun in QBasic when I was 16, and the concept was revisited when I was wiring an adder on a breadboard in college, but it is staggering to have to do that to get real work done.

This is tested production code, so that's not going to get thrown away anytime soon. However, each time I bolt on another feature I feel like I'm building a cathedral out of rubble and debris. Relief is on its way, though: I've been building a foundation in Python that I believe I can shift this macro code over to. Then Python can handle the business logic and final validation while leveraging tested code to perform the required steps.

Jun. 29th, 2014

A change of scenery

I am absolutely lost on this computer of mine.

When my old PC finally died and I built my new one, I tried several different Linux distributions and was dissatisfied with each for some reason or another. I ended up defaulting to Ubuntu because it had the fewest hardware problems out-of-the-box and because it was what I'd been using on the old PC. However, that has proven to be a frustrating and debilitating decision: I don't use my PC but once every several weeks. I hate the GUI. Seriously, I absolutely and completely hate the GUI. It frustrates the fire out of me. It's time for something new.

So, I'm going to try Arch Linux. I want to use LVM and have snapshots of my hard drive. I want to use stock Gnome 3, customized to look like Gnome 2, the only Linux GUI I've ever been comfortable with. And I want to WANT to sit down in front of my computer and work on feedparser. I haven't touched it in forever, and I know one of the big reasons is that I hate -- HATE -- using my computer, ever. I basically only use my PC once each month because I have to pay bills.

I usually dislike announcing an intent to do something but this is more for me than it is my readership. I want a stake in the ground to spur me on to actually fix this awful situation.
Tags:

May. 6th, 2014

Raspberry Pi benchmarks

I had a bit of time today and decided to start using the Raspberry Pi I bought last year. I'm very interested in wringing performance out of it, so to the best of my ability I'm going to measure performance.

I had previously downloaded Arch Linux, so I put that on an SD card. Then I saw a blog post suggesting that a USB drive could increase the performance. So! I adapted the instructions and captured some benchmarks. Quick summary: the USB drive has a slower write speed but a faster read speed...but I have to acknowledge that the results might be better with a different USB drive.

The SD card (a 32GB Sandisk Ultra class 10 32GB card)

[root@alarmpi sdcard]# hdparm -tT /dev/mmcblk0

/dev/mmcblk0:
 Timing cached reads:   312 MB in  2.00 seconds = 155.98 MB/sec
 Timing buffered disk reads:  54 MB in  3.06 seconds =  17.65 MB/sec
[root@alarmpi sdcard]# sync;time bash -c "(dd if=/dev/zero of=bf bs=8k count=50000; sync)"
50000+0 records in
50000+0 records out
409600000 bytes (410 MB) copied, 39.6374 s, 10.3 MB/s

real    0m41.003s
user    0m0.240s
sys     0m10.230s
[root@alarmpi sdcard]# dd if=bf of=/dev/null
800000+0 records in
800000+0 records out
409600000 bytes (410 MB) copied, 22.3598 s, 18.3 MB/s

The USB drive (a Lexar 8GB Jumpdrive)

[root@alarmpi ~]# hdparm -tT /dev/sda

/dev/sda:
 Timing cached reads:   308 MB in  2.00 seconds = 153.90 MB/sec
 Timing buffered disk reads:  58 MB in  3.04 seconds =  19.09 MB/sec
[root@alarmpi ~]# sync;time bash -c "(dd if=/dev/zero of=bf bs=8k count=50000; sync)"
50000+0 records in
50000+0 records out
409600000 bytes (410 MB) copied, 41.1666 s, 9.9 MB/s

real    0m45.185s
user    0m0.250s
sys     0m8.210s
[root@alarmpi ~]# dd if=bf of=/dev/null
800000+0 records in
800000+0 records out
409600000 bytes (410 MB) copied, 20.5428 s, 19.9 MB/s

Nov. 10th, 2013

Turnabout

While eating dinner with one of my brothers.

Me: I love you, Stephan.
Stephan: Thanks, Kurt.
Me: Really appreciate spending time with you, and especially when you sometimes aren't talking.
Stephan: Wha...
Me: See what I did there? That's called a 'neg'.
Stephan: Wow, you know that's really clever, Kyle! Whoops, I mean 'Kurt'. You see what I did there? Sometimes I purposefully get people's names wrong so they know I don't care about them at all. It lets them know I just don't give a

END BLOG ENTRY

Oct. 2nd, 2013

Raspberry Pi server

I'm working on getting my Raspberry Pi configured as a web server. It's my intention to finally start hosting my own website again after many years of using hosted services. So far I've got the right software installed, now it's just going to take some time to configure all of the settings. And then it will take a while to import everything from my old Wordpress blog, Blogger, and LiveJournal. Tons to be done!

Apr. 9th, 2013

And after four days

And after four business days we're back in extended hours. At least I got a two-day weekend out of it. I didn't even make it into the building before I found out. I am absolutely exhausted and uninspired.

Tags: ,

Apr. 1st, 2013

April didn't come soon enough

Man alive, I've been working 12-hour days, seven days a week, for almost the entirety of March. It has been grueling. During this time I gained 10 pounds due to atrocious eating habits (like eating right before bed at 3:00am), my voice has become damaged thanks to stress- and diet-related acid reflux, and I've started waking up with caffeine deprivation headaches.

It all culminated in a very successful quarter-end, though. I got off work at 4:35am on Easter morning, slept for a bit, then went back for another 12 hours. When I got home this morning and checked my mailbox I realized that the stars were beginning to align for me: a Victoria's Secret swimsuit catalog had been mis-delivered to me. Ha!

Google has announced that they're shutting down their Reader service, so I'm excited to coincidentally have free time open up to improve feedparser. It's been a while since I've had time to solve complex problems, so I'm looking forward to relaxing with a hobby I enjoy. Stay tuned for another post in which I'll summarize the state of feedparser and what I'm planning to work on this year!

Feb. 6th, 2013

In Europe, day 4

Although my days have been largely consumed by meetings and discussions I've been finding time to enjoy Zaltbommel and its many restaurants.

Yesterday for dinner I had duck liver, quail, candied apple, pork and mashed potatoes, crème brûlée, wine, and a delicious Trappist beer named Dubbel at a wonderful restaurant in Rossum named De Gouden Molen (the Golden Windmill, I'm told). The night before that I had a Greek meal consisting of souvlaki, suzuki, fried potatoes, tzatziki, and vegetables. The beer of the evening was called Bavaria and was outstanding.

Tonight, however, my coworker and I were exhausted so we had a simple meal: McDonald's. Damn, baby, the Dutch have better french fries than we do, even at McDonald's! And the vegetables on my Chicken Sensation were fresh and delish! I've spent the evening relaxing and emailing while watching 28 Dresses and, now, the first Star Trek movie. It's airing on RTL7 (meer voor mannen). Even their Captain Morgan commercials are better than ours!

There's just one thing I need in this world: French vanilla coffee creamer. Everyone here laughs at me, even at the grocery store! Koffie met vanille?! marveled the clerk. Heaven help me, YES! All of the coffee here is unpotable? C'MON!

Anyway, now it's bedtime. I've got a big day of trainings and meetings tomorrow, and then I'm hoping to head into Den Bosch by train for dinner and to find a music store...

Tags: ,

Previous 10

October 2014

S M T W T F S
   1234
567891011
12131415161718
19202122232425
262728293031 

Syndicate

RSS Atom
Powered by LiveJournal.com