Part of that world

March 4th, 2010

(3:14:55 PM) john.weatherford: alright
(3:14:57 PM) john.weatherford: quick test
(3:14:58 PM) john.weatherford: http://www.joystiq.com/2010/03/04/alpha-protocol-has-gadgets-and-gizmos-aplenty/
(3:15:06 PM) john.weatherford: the title of that article
(3:15:11 PM) john.weatherford: what does it come from
(3:16:15 PM) billiamo: ariel
(3:16:19 PM) john.weatherford: you win
(3:16:29 PM) billiamo: yay!
(3:17:11 PM) billiamo: (Technically, I think, the right answer is actually “The Little Mermaid”)
(3:17:20 PM) john.weatherford: i knew what you meant
(3:17:22 PM) john.weatherford: unfortunately
(3:17:38 PM) john.weatherford: you awent thingamabobs, I got twenty
(3:17:43 PM) john.weatherford: want*
(3:21:15 PM) billiamo: whoa
(3:21:19 PM) billiamo: that’s sorta scary
(3:21:22 PM) billiamo: for some reason
(3:21:28 PM) billiamo: I had the compulsion to come back and type that line
(3:21:31 PM) billiamo: and I got back
(3:21:36 PM) billiamo: and you’d already written it
(3:21:39 PM) john.weatherford: yeah
(3:21:51 PM) billiamo: I have whosits and whatsits galore
(3:22:04 PM) john.weatherford: but who cares…
(3:22:06 PM) john.weatherford: no big deal
(3:22:09 PM) john.weatherford: i
(3:22:11 PM) john.weatherford: want
(3:22:12 PM) billiamo: but I want MORE
(3:22:14 PM) john.weatherford: Moooooooorrreeee
(3:22:23 PM) john.weatherford: flippin your fins you don’t get to far
(3:22:31 PM) john.weatherford: (we never speak of this to anyone)
(3:23:51 PM) billiamo: they probably already know

PHP GSM Character Set Validation

September 17th, 2009

I recently encountered a somewhat tough probelm in validating a string as having valid GSM characters such that when sent in a text message, there would be no problems displaying the text. If you need more info on GSM characters, there is a great resource here. The code is pretty simple. It starts with a large PHP array of all the ascii codes for the GSM characters, then does a simple walk through the string checking if each character’s ascii value is in the Array.

 $valid_gsm_keycodes = Array(  
        0×0040, 0×0394, 0×0020, 0×0030, 0×00a1, 0×0050, 0×00bf, 0×0070,
        0×00a3, 0×005f, 0×0021, 0×0031, 0×0041, 0×0051, 0×0061, 0×0071,
        0×0024, 0×03a6, 0×0022, 0×0032, 0×0042, 0×0052, 0×0062, 0×0072,
        0×00a5, 0×0393, 0×0023, 0×0033, 0×0043, 0×0053, 0×0063, 0×0073,
        0×00e8, 0×039b, 0×00a4, 0×0034, 0×0035, 0×0044, 0×0054, 0×0064, 0×0074,
        0×00e9, 0×03a9, 0×0025, 0×0045, 0×0045, 0×0055, 0×0065, 0×0075,
        0×00f9, 0×03a0, 0×0026, 0×0036, 0×0046, 0×0056, 0×0066, 0×0076,
        0×00ec, 0×03a8, 0×0027, 0×0037, 0×0047, 0×0057, 0×0067, 0×0077,
        0×00f2, 0×03a3, 0×0028, 0×0038, 0×0048, 0×0058, 0×0068, 0×0078,
        0×00c7, 0×0398, 0×0029, 0×0039, 0×0049, 0×0059, 0×0069, 0×0079,
        0×000a, 0×039e, 0×002a, 0×003a, 0×004a, 0×005a, 0×006a, 0×007a,
        0×00d8, 0×001b, 0×002b, 0×003b, 0×004b, 0×00c4, 0×006b, 0×00e4,
        0×00f8, 0×00c6, 0×002c, 0×003c, 0×004c, 0×00d6, 0×006c, 0×00f6,
        0×000d, 0×00e6, 0×002d, 0×003d, 0×004d, 0×00d1, 0×006d, 0×00f1,
        0×00c5, 0×00df, 0×002e, 0×003e, 0×004e, 0×00dc, 0×006e, 0×00fc,
        0×00e5, 0×00c9, 0×002f, 0×003f, 0×004f, 0×00a7, 0×006f, 0×00e0 );

        for($i = 0; $i < strlen($string); $i++) {
            if(!in_array($string[$i], $valid_gsm_keycodes)) return false;
        }

I hope this code is helpful and will save someone else some time, since I didn’t find any other resources online.

Cubicle Fort

June 20th, 2008

Today I considered sitting down with the nice people who work in operations at our company to kindly tell them to leave the tech team alone. The problem that we suffer from is a lack of division between teams. A lot of places brag about how their offices are open and how conducive the environment is to open communication. All that open communication often comes with a price. If people are talking, chances are they are not distracting someone from work. When a person from operations decided to make travel the 7 and a half feet over to the tech cubes, they almost always do something terrible.

“Hey, do any of you guys know…”

Immediately all of us are no longer working, and worse yet, we were all in the middle of something. Two sins have been committed here. First, each of us must recommit to the work we were doing, and second three of us are now engaged in a conversation that is really only meant for one. That question is costing the company upwards of $300/hour. Now what to do?

Recently I really considered converting my office into a fort. Then I could put up a sign to let everyone know whether or not I was available. There has to be a reasonable solution for cubicle-style offices that allows employees to work without distraction. Maybe if we did actually build forts that would keep the outside world at bay while we slowly slip into a life of seclusion. For now, that is the best idea I have… but I am open to new ones.

I have failed you Joel Spolsky

June 9th, 2008

I want to start with a formal apology to one of my favorite authors Joel Spolsky. Recently I overheard the system administrator at my company speaking with a remote employee, debugging simple windows problems. After I heard him finish his half an hour call, I decided to send him a link to Copilot, and told him a little bit about it. After he checked it out, he decided that he could not justify the costs. For anyone who has never used it, or did not click on the link, Copilot costs virtually nothing. For a full 24 hours of use, the terrible cost is $5. However, if this is too overcoming of a price, you can subscribe to a pay as your go plan for a whopping price of $0.25 per minute, aka $15 an hour. Even better, for the full time user, $19.95 a month would allow you unlimited use every month.

Let’s crunch the numbers for a minute. Let’s assume we sign up and use the “most” expensive plan, which I think is the pay as you go plan. We will use the worst case scenario. Let’s assume that copilot saves the sysadmin a total of 30 minutes on his next 1 hour call. This means he spent 30 minutes on copilot costing the company $7.50, and he saves 30 minutes. If you think that it is outrageous to assume that a person could turn a 60 minute tech support call to a 30 minute tech support call, then you have never had your girlfriend call you at ten o’clock at night because all of her pictures are gone forever, and she doesn’t know where to find them because link to the folder on her desktop was accidentally deleted. Back to the topic. To be able to justify this immense $7.50 cost, to only save 30 minutes, the sysadmin would have to be making less than $15 an hour! FIFTEEN DOLLARS AN HOUR!

Update: Joel you would be proud. I may have finally convinced him. The long dissertation on how frustrating it is to have a sysadmin who constantly fights change and new technologies will have to wait for another time. Most likely soon.

Frick, what time is it?

June 4th, 2008

Wired magazine recently ran an article by Alexander Gelfan titled “Long-Promised, Voice Commands Are Finally Going Mainsteam.” Here he discusses what he believes to be the coming age of voice recognition for computer software. He even touts the voice recognition software he was using to transcribe the article. Although there is no way to fully understand his user experience (besides emailing him or using the program), I would guess that he does not use voice recognition for all his articles. Although the article continues to promise better and better voice recognition, I am just not sure if consumers are ready for a computer that we can talk to.

Last Christmas I bought my fiancee’ a shiny new Macbook. She loved it. She spent all day playing with the new features. I remember when she stumbled across the voice recognition because she was ecstatic. She couldn’t believe you could talk to your computer or even ask it a question. She explored further. Named her computer “Frick” as an homage to her favorite expletive. She couldn’t wait to show off her new toy. “Dad Dad, look at this… Frick! what time is it?… <no answer> Frick! what time is it? <no answer> Frick!!! WHAT TIME IS IT?” Finally the fifth or sixth time the computer answered with the time. Not the ideal user experience I am sure. I agree that in time, with better software and a stronger processor, the computer could be tuned to answer on the second or third try, or with luck, the first. The question is really, who wants to talk to their computer?

In the article Mr. Gelfand describes many uses for enhanced voice recognition, and wisely avoids discussing the PC. I would be willing to bet the farm that in 10 years, people will not be talking to their computers on a normal basis. Computers are an individual media, and are very personal. Regularly what I am doing on my computer, I don’t really want others to know about. There are very few cases where I would actually be alright with speaking aloud to my computer, one being the case that I am showing off my new voice recognition software. As for voice recognition for computers at work… probably never. First the noise pollution would destroy productivity, and second, anyone who does any personal IM or Email at work would immediately switch to keyboard to use that. Lastly, since this is a programming blog, what programmer in their right mind would even consider for a second using a voice recognition software to program…

“Frick, object x equals new Person with parameters first name last name…”

“FRICK!, object x equals… forget it, this is stupid”

Programmer Buffet

May 30th, 2008

As I struggle today to find my center at the office, I notice that my mind is constantly in a state of frenzy. I will explain, since my situation is not unique, and I believe most (if not all) software programmers suffer from this problem. My boss has given me 3 major tasks this week which are almost completely different, and all must be completed in a short timespan. I know no one is going to cry for me, or send me cookies, but I always consider how a programmer should work, and what really helps a programmer be productive. One of my favorite authors, Joel Spolsky has spent plenty of time discussing the importance of working conditions for Programmers. Even though I think that this is a must read for any company that thrives on it’s developers, I will leave that discussion aside for now. Currently, I can’t even focus on writing this menial blog as I notice our CEO perched on some sort of furniture as the entire office partakes in some loud furniture moving orgy.

Granted, it is Friday afternoon, and normally I would be participating, and enjoying myself, but I have gotten distracted even from my original intent. Should programmers have to juggle tasks? It seems that when I sit to program, I fill my head with as much information about the project as possible. This includes variable information, project information, objects, functions, error cases and a whole bucket of other crap. When I have 3 pending projects my mind gets cluttered. It isn’t bad enough that I have coworker, email, telephone, and supervisor distractions, I sabotage my own project by letting other tasks seep in causing mental tie-dye. I considered today whether I would work more consistently if I had only one task to concentrate on. I even considered (probably to my own demise) suggesting my boss only assign me one task at a time.

The more I consider this, the more I believe this would be an efficient way to manage programmers. Give one task and one task only. If there is anything I know about programmers, is that we have a one track mind. Programmers are not paid to juggle priorities, or to take calls from customers or answer questions from co-workers. Programmers are paid to sit, focus, and program. Maybe I should cowboy up and tell my boss my new idea. I don’t think that is going to happen. Not because I fear my boss, but simply because I fear it will make me useless. Despite my desire to be the best programmer I can, I must constantly take note of how my supervisors, co-workers and clients act. For now I will probably just ignore all but one of the tasks I have, and possibly in the future, consider serving my employees one task at a time.

Postscript: I want to work here for Joel.

Welcome

May 13th, 2008

To liveLoveCode. This site is maintained by three long time friends and programmers: Bill O’Connor, J.R. Hass and John Weatherford. We each bring unique points of view from diverse programming background with very different real world market experience. All three of us hail from the prestigious University of California San Diego (I am sure you have heard of our undefeated football team). Two of us graduated with Bachelors of Science in Computer Science, while the other (J.R. Hass) only was able to achieve a Bachelor of Arts. If you are looking for more information please see the About page, where you can learn everything you ever wanted to know about the authors of this blog. From here I will sign off, and let each of the other authors introduce themselves.

PS. we love code