Archive for category Programming
I’ve been complaining that I can’t run Linux at work since they moved to the new VPN. I’ve tried time and again to get it to work but it is a proprietary system that only has a client for OSX and Winders. I’ve been using Win7, which all in all isn’t too bad, for about the last year. I was talking with one of the newer guys that got a shiny new MacBook Pro when he started about building our project. I told him that when I kick off a build I generally have about 17 minutes of browsing the web time since the build process basically renders the computer almost unusable. He was dumbfounded that it too me 17 minutes to build our project because it only took him around 3 minutes for a full clean and build. Surely he was misinterpreting what I was doing, there is no way the build times could be that different, hey, it’s all just Java.. Sure enough, he showed me and the project built faster than I had ever seen.
He started up IntelliJ in less than 20 seconds and I got pissed. Usually when I get in in the morning the first thing I do is start up IntelliJ, then I go get coffee, go to the bathroom then commando crawl back to my desk just in time for IntelliJ to have started up and begun indexing my project. I immediately put in a request for a Mac.
I got my shiny new MacBook Pro a couple weeks later and eagerly started setting up my development environment on it. I gleefully flipped the bird at my old PC every time I ran the native command line or built one of my projects. So far everything has been going swimmingly, I have completely transferred all my work to the Mac and I’ve been working off it exclusively for the past couple of weeks. There are only a couple of things that make me raise and eyebrow about how the Mac works
1) What the hell did Apple do to the Unix file system?? What is this /Library and /System and other odd folders doing in my root? Best just to delete them since they look erroneous (joking.. don’t really do this, it really messes with your system)
2) Task switching, I know it’s a little nit picky, but I seriously can’t Cmd+tab to a minimized program? Why show it in the list if selecting it isn’t going to do anything.
3) Does everything seriously cost money on a Mac? I guess the notion of Free as in beer hasn’t made it’s way here yet. Yes, I’m a bit on the cheap side, but hey, I use a free operating system I’m not going to pay $5.99 for a better task switcher for my work Mac.
4) The command and control keys need to be put into a ring and only one of them gets out alive. Seriously Apple, which one is it going to be? It seems Apple wanted to replace the control key at a system level with command but all the application developers disagreed and continued to use the control key for all their shortcut commands. This is an area of endless frustration for me, it usually takes me 3 tried to copy anything then another 2 to paste it.
Thats it for now, I’ll be sure to post some more annoyances in the future. So far I like the Mac better than my PC, but it isn’t as perfect as the Mac fan-boys would lead you to believe.
…*sigh, yeah, that what I am doing right now. Pining for midnight, fingers itching to hit the send button on the email to the admins to deploy the tag to the production servers. 57…58…59…MIDNIGHT, rock and fire!
Now I just wait while the admins do their things, and watch the ‘The web site is down’ alert messages from our hyperactive monitoring software. Yeah, thanks Chip..
Whee, the app is back online. QA … go get ’em
Hey kids! Have you ever wanted to pursue a career in programming? Checkout this site to see EXACTLY what its like! Just click the ‘Hack!’ button and start typing, you’ll be hacking Linux kernel code before you even realize what you are doing. Isn’t programming fun!
I just finished the Google CSE article I started a couple of weeks back. It was an interesting project, mostly due to the fact that I have never worked with the Google search API before and it was enjoyable to learn something new.
Hopefully you find it useful. When I was putting the code together, I found there to be a distinct lack of articles or documentation on the Custom Search Engines. Hopefully this helps someone. Then again, Google will probably EOL the JS CSE API in the next few months and I will have written the article for my own benefit. Ah well..
I have been working to implement a Google custom search engine into a clients website. I have had to pour through the documentation to fully understand how it works and I am both impressed and revolted simultaneously. I keep getting the feeling that this stuff was originally developed by people that are obscenely smarter than I am. Its obviously brilliant, but like any brilliance, its usually offset by some other glaring omission.
First off, the search API from Google. Why is the primary search API deprecated and the recommended replacement not even out of labs yet? So let me get this straight, I can either use the API that will EOL’d at some unknown time by Google without warning, or I can use the unstable labs API that could and most likely will change in the future. Sounds like a call from the client complaining that their site is broken just waiting to happen.
Second, the API is written in a way that leaves massive holes of undocumented functionality. Usually when you document an API you include ALL the functionality so people can fully utilize all the features. So I am continually finding blogs and other bastions of literary excellence revealing ‘hidden’ features of the Google search API. I have implemented a fair amount of the code I have found on these sites and I am still flabbergasted as to why Google would just leave this stuff out of their documentation.
I am going to be writing up an article on implementing a Google custom search engine over the next few days, one, so I can remember if I have to do it again in the future, good documentation is sparse on this subject, and two so others can refer to it and hopefully avoid some of the frustration I have gone through to get this to work.
I needed a quick way to put a default value in a select query for MS SQL Server 2000. Sure there are plenty of ways I can do it programmatically after I have the resultset, but there wasn’t going to be any intermediate step. I was querying directly to an export file so I needed to have everything in one place. There were some columnar values that were required but we didn’t have any good data to put into the column. Here is what I did, ‘MyDefaultValue’ would be the static column value, in case you were wondering:
DECLARE @x CHAR(1) SET @x=1 SELECT myColumn1, myColumn2, CASE @x WHEN 1 THEN 'MyDefaultValue' END AS [myColumn3] FROM myDatabase