Showing posts with label Software Development. Show all posts
Showing posts with label Software Development. Show all posts

Wednesday, December 2, 2009

Where And Means Or and Or means And.

Have you ever found yourself sitting around wondering what exactly it is I do all day at work when not giving you this lovely typo ridden blogs? No? You have haven't...well I gotta say that hurts. Lucky for you I don't care. I am going to tell you any ways. Here is a stark lesson in something I learned long ago and that bit me and a co-worker in the ass yesterday.

So we all know the words And and Or. And means these two things in conjunction. Or means this thing or this other thing. For the most part this logic holds true in computers as well. Save for the situation I am about to show you. Now you need not know a lot about SQL to get this lesson. The part you want to pay attention to is in Italics.

SELECT COUNT(*) AS rowCount
FROM StudentCourse r,
(SELECT StuCrs_Student, StuCrs_Course, StuCrs_LicenseCourse, StuCrs_Completion, MAX(StuCrs_Created) AS maxTimestamp
FROM StudentCourse
WHERE StuCrs_LicenseCourse = 'Course'
AND StuCrs_LicenseCompletion = '1974-10-17'
AND StuCrs_LicenseStudent = 'Student'
AND (StuCrs_Course <> StuCrs_LicenseCourse
AND StuCrs_Completion <> StuCrs_LicenseCompletion
AND StuCrs_Student <> StuCrs_LicenseStudent)
GROUP BY StuCrs_Student, StuCrs_Course, StuCrs_Completion) rh

WHERE r.StuCrs_Student = rh.StuCrs_Student
AND r.StuCrs_Course = rh.StuCrs_Course
AND r.StuCrs_Completion = rh.StuCrs_Completion
AND r.StuCrs_Created = rh.maxTimestamp

See that inner Select statement is how I am getting a ton of items out of our database. Now the symbole which you are likely not familiar with is "<>". That simply means not equal. Why did SQL chose that over != like every other reasonable language? Fuck if I know.

So here is where my cohort and I got into trouble, see if your saying this does not equal this and this does not equal this, and you only need one of them not to be equal you actually want to say OR. Basically this happens b/c I am mixing negative statements (not equal) with positive statements (equals) I know this sounds obvious, but I promise you this trips up more developers then you know. So remember kids, sometimes when you mean And you really mean Or.

Monday, November 9, 2009

Verizon Droid

Let me start of by saying that I am 100% in love with my droid. I feel it was the perfect phone for me, and my needs. I do not think it is the perfect phone for everyone. I feel that for the non-power user the iPhone might still be the best phone out there.

Some things that I think the iPhone has over the Droid.

1) The camera on the iPhone is a million times better. The camera on the droid so far has given me terrible results. However I couldn't care less about this. I'll explain why later.

2) I am willing to bet that searching the iPhone app store from the phone and web is actually a bit better then from android. Not a huge deal, but there is room for improvement. Like say being able to filter out pay or free apps after a search like "Terminal"


My expeirence with iPhone is pretty limited since I have never owned one and only used my friends phones, but some things I am in love with about the droid where the iPhone comes up short.

1) I don't really do much on Facebook, but the Facebook integration into contact is the win. I only wish you could add a face book account to someone in the case where there Facebook name is different from what you call them.* Due to this feature I don't really need the camera to work very well b/c It will simply use my friends Google or Facebook profile photo. No real need for me to have the camera.

2) If you are one the desciples of Google, the integrated Google Contacts, Calendar, and Email is 100% the win. There is another Google app that deserves it's very own bullet point.

3) Google Voice for the win. I can't say this strongly enough. While Google voice is still only in BETA and invite only, it has changed the way in which I view my phone. It allows me to have it take over all of my SMS and Voice Calling. To put this in perspective, you can in theory use zero minutes and zero SMS messages if you use a Google Voice number. FOR THE WIN.

4) VPN support out of the box. Well kind of anyways. I have yet to figure out how to get this working with CISCO VPN. I will have it solved before to long though.

5) It runs Linux. Look...this matters to me. Deal with it.


Overall for the non IT/Software Developer set, the iPhone is most likely still the phone for you. If your a youngster not super interested in technology or extreme control over your device, get the iPhone. There is nothing wrong with it. It's a VERY solid device. However if your the type who wants to be able to admin a server remotely and deal with your corprate life as well as your social life all from one phone, then the droid is the win.

*I am looking at you Alissa

Monday, October 26, 2009

Maybe I am OCD

I can't seem to stop thinking about the new Android phone from Verizon. I am constantly pondering it's abilities, what calendar support it will have, how it will sync with my Linux boxes, and oh so many other things. The thing I have probably spent the most time thinking about however is the ad campaign.

I am far from a marketing guy. I find lots of things about the field to be somewhat evil, but on occasion people make what I would consider art, or at a minimum something that is very interesting and is worth of critique.

Last night I am watching baseball with a close friend, and we starting talking about the various adds we have seen a 1000 times now.* So during one of the breaks my friend and I get to talking about the android phone. We start ripping into the details of a 45 second add spot.**



Now my friend contends that the add doesn't actually tell you what the phone does. However, I have to disagree with him. I am the first to admit that I drank the open source Kool-Aid a long long time ago, but I don't think this is my blinding love of all things Open Source effecting me here. Can we go to list form for a minute? I want to just rattle of some points about why this add is amazing.

1) In the first part it nails the entire asthetic that Apple has been using for their branding.

2) It uses that branding to mock apple at the same time.

3) Then out of no where they take that entire look, and turn it on it's head.

It's awesome. I couldn't be happier with the add.*** They tell you several things the phone does by pointing out the short comings of it's supposed competitor. It's genius.

Now, here is the REALLY REALLY cool thing that the fine folks at Verizon did to promote the phone to the media.



That's right, the gave out some R2D2's. That's just sweet marketing. Sure you should give out some C3PO's so that his feelings don't hurt****, but I can live with this.

Now, look I have no belief that this will hurt apple. Their brand is so powerful right now that it's scary. There is a HUGE culture of people who buy into it and all it's trappings. That's a great job by them. I will however say that the fine folks about RIM should be really worried.
*When you watch every playoff baseball game you get beaten down by the same products over and over and over again. I'M LOOKING AT YOU FRANK TV!


**You'll be shocked to hear this, but we don't have girlfriends and not a single girl hit on us during the game.


***Here I will admit to a bit of fanboydom. Though the add is good.

****He is rather sensitive after all

Monday, November 24, 2008

Project Managers vs Developers

The Project Manager vs The Developer is an age old battle. Both sides are wrong in some respects, and both sides are right. Though today, I heard one of the most telling differences. My project manager said, "I don't get this people who spend all their time figuring out all this weird computer stuff." My thought on that statement, "Umm...yeah I do. I mean this was my hobby before it became my job." I find it strange not understanding my someone wouldn't want to tackle computer problems. I mean at it's core, software development is nothing more then problem solving and logic puzzles. There's nothing wrong with that IMHO.

Friday, November 21, 2008

Arrays

I don't ask much, but can every computer language please begin array indexing from zero? Please? It's a huge PITA to remember which one's don't.