Eh, Maybe not.
If you do read this blog, there's a chance you've noticed the new Twitter sidebar widget. It says "Reluctantly". There's a lot of buzz around Twitter and that's got me on guard. Just like the iPhone (which I'm still trying to avoid), Twitter has to prove that it's really as good as everyone else thinks it is.
Every since I got into blogger and started trying to grind my writing skill I noticed there were certain little blurbs and short statements I wanted to blast into the ether of the intarwubs, but I really couldn't justify full blog posts for them. That's where I hoped Twitter would come in.
Unfortunately, I'm really not impressed. The Linux clients available are dismal, but there are some OK plugins for Firefox. When I went to add my little icon, the service told me it was "overloaded". Further, it said the cause of this was "Too many tweets." Somehow people actually USING the site had placed such a strain on their backend and/or bandwidth that user profiles couldn't be updated...but tweety activity on the main site continued unaffected. Huh? Whatever. Only it's done the same thing every subsequent attempt to get a picture up, and that's pretty annoying since the default icon is brown and lame. Also, with only about 140 characters per update...I'm not sure how the service could get that overwhelmed. That'd probably fit into a single packet.
That's another disappointment too, the character limit. I hit it with the FIRST post I tried to make, and took 3 minutes to edit and cut down...not really the amazing avenue for "mini-blogging" I had in mind. If I wanted to make updates that were this small, I'd just use Facebook's "status" feature. But everyone else seems pretty excited about Twitter so I'll continue the effort in good faith...but I'm still looking for the service I was hoping to find. Anyone got any recommendations or am I going to have to homebrew this one too?
...At least it's not completely "Web 2.0 Trendy", and called "Twttr."
--PXA
Monday, November 3, 2008
Monday, October 27, 2008
I haven't written about jQuery yet.
I realized that while I've had jQuery listed as an interest of mine for all this time I still haven't written about it. Shame on me.
One of the coolest things about jQuery, aside from the fact that it is generally kind enough to stay out of your way and let you write YOUR javascript the way you want to with just a bit of help from it (unlike some other JS libraries *cough*prototype*cough*), is the rather robust extensibility. It's almost trivial to write your own plugins for jQuery, which other people can then simply include and use like it was any part of the library. You can even override or extend existing jQuery functionality if you wanted to.
On a recent project I had to add functionality to a page to create a dynamic list of filters for some log information, which was presented on a table. The filters had different types, some were time/date fields, some were plain text, and some you could pick from a preset list of values.
Some of my favorite programming features and APIs are the kind where you can setup a large list of parameters, instantiate an object or call a method and let 'er rip. Plugins, especially jQuery plugins, really lend themselves to this sort of programming.
I ended up using this approach to write my filter feature, eventually realizing I could turn it into a jQuery plugin without too much effort.
Here is a link to my actual .js file for the plugin-ized version. And here is a basic example of how to use it.
When an option is selected from the original dropdown, the script looks at the type in that filters array to decide what to add. The types of "text" and "datepicker" both create text fields, but the datepicker has a special event attached to it to popup the jQuery datepicker and let you pick a range of dates. The only other option right now is to set an array like "[[0,'Open'],[1,'Closed']]", each internal tuple (python terminology), consists of a value and a name. The plugin uses these to make another dropdown list using those tuples.
Right now creating your own types involves adding a new elseif to the code, but it'd be pretty easy to add a hook to write new type handling functions.
Anyway, I finally wrote about jQuery. Even if I suck at writing.
--PXA, apologizes for this mess.
One of the coolest things about jQuery, aside from the fact that it is generally kind enough to stay out of your way and let you write YOUR javascript the way you want to with just a bit of help from it (unlike some other JS libraries *cough*prototype*cough*), is the rather robust extensibility. It's almost trivial to write your own plugins for jQuery, which other people can then simply include and use like it was any part of the library. You can even override or extend existing jQuery functionality if you wanted to.
On a recent project I had to add functionality to a page to create a dynamic list of filters for some log information, which was presented on a table. The filters had different types, some were time/date fields, some were plain text, and some you could pick from a preset list of values.
Some of my favorite programming features and APIs are the kind where you can setup a large list of parameters, instantiate an object or call a method and let 'er rip. Plugins, especially jQuery plugins, really lend themselves to this sort of programming.
I ended up using this approach to write my filter feature, eventually realizing I could turn it into a jQuery plugin without too much effort.
Here is a link to my actual .js file for the plugin-ized version. And here is a basic example of how to use it.
$(document).ready(function() {
$('#filterform').filterselector(
{filters:[{value: 'state', name: 'Status', type: [[0,'Open'],[1,'Closed']]},
{value: 'customer', name: 'Customer', type: 'text'},
{value: 'opened', name: 'Date Opened', type: 'datepicker'},
);
});
The code above is used by the plugin to create the HTML to display the initial form, which consists of 3 buttons and a single drop down list. The dropdown list is constructed using the value and name attributes, where value is the and name is the pretty name. It's probably easiest if value corresponded to the name of a database field somewhere, for ease of writing the backend.When an option is selected from the original dropdown, the script looks at the type in that filters array to decide what to add. The types of "text" and "datepicker" both create text fields, but the datepicker has a special event attached to it to popup the jQuery datepicker and let you pick a range of dates. The only other option right now is to set an array like "[[0,'Open'],[1,'Closed']]", each internal tuple (python terminology), consists of a value and a name. The plugin uses these to make another dropdown list using those tuples.
Right now creating your own types involves adding a new elseif to the code, but it'd be pretty easy to add a hook to write new type handling functions.
Anyway, I finally wrote about jQuery. Even if I suck at writing.
--PXA, apologizes for this mess.
Monday, October 20, 2008
Sound the alarms
So I was walking to my car after work today and saw something VERY curious. On the corner of RIT's building 77 (The admissions/financial aid/co-op office building) there was what looked like a glow stick, duct taped to the side of a pillar.


Seriously? It wasn't glowing, and wasn't as green as they usually are. What I'm wondering is what paranoid idiot will call some sort of terrorism warning in on it. (Boston, anyone?)...I stood around for like 3 minutes looking at it...but I was thinking about if taking it.
Fun.
--PXA


Seriously? It wasn't glowing, and wasn't as green as they usually are. What I'm wondering is what paranoid idiot will call some sort of terrorism warning in on it. (Boston, anyone?)...I stood around for like 3 minutes looking at it...but I was thinking about if taking it.
Fun.
--PXA
Sunday, October 19, 2008
Spreading the wealth
So on my recent trip I spent a few hours (like 9) trapped in Chicago's O'Hare airport. And at one point received a phone call from a good friend of mine who I had tapped to tend bar in my absence at Steak and Whiskey night last night. The woman next to me at the bar had a son who was a bartender and was interested when I started talking about a drink recipe.
At Steak & Whiskey 2 we created a drink which was tremendously popular called "Stand back! I'm about to try science!". Science was created through use of the scientific method.
Hypothesis: Irish Cream and Amaretto curdle.
Evidence: several shots with these 2 ingredients were curdling in the glasses.
Experiment: Mix the 2 ingredients in equal portions.
Conclusion: Not only do they not curdle, they are delicious together.
It occurred to me that by telling her the story so that she could tell her son, this drink could suddenly start being made in a remote corner of the country - Far from Rochester.
Why not the world?
Now I call on the power of the internet to spread the good word of this drink.
Go forth and get blasted!
At Steak & Whiskey 2 we created a drink which was tremendously popular called "Stand back! I'm about to try science!". Science was created through use of the scientific method.
Hypothesis: Irish Cream and Amaretto curdle.
Evidence: several shots with these 2 ingredients were curdling in the glasses.
Experiment: Mix the 2 ingredients in equal portions.
Conclusion: Not only do they not curdle, they are delicious together.
It occurred to me that by telling her the story so that she could tell her son, this drink could suddenly start being made in a remote corner of the country - Far from Rochester.
Why not the world?
Now I call on the power of the internet to spread the good word of this drink.
Go forth and get blasted!
Thursday, October 2, 2008
I <3 Launchy!
It's no big secret that Launchy is one of the best programs ever to be written for Windows.
For those unfamiliar, Launchy is an open source keystroke launcher for Windows. Effectively a clone of the incredibly useful OS X tool Quicksilver. Launchy binds to a global shortcut key combination (defaults to alt+space) and then indexes the links in your start menu as well as others, allowing you to simply begin typing the name of the program you'd like to run and then hitting enter when you've given Launchy enough to work with. Launchy also learns what your common shortcuts are, so the first time you need to launch Firefox, you'll probably need to type almost the whole thing. However, after a few weeks you'll be able to launch Firefox by typing "f" into Launchy.
I have previously made the statement the Executor was better because it allows custom keywords to be set in the application so you can configure it to...say, run Internet Explorer when you type "turdpile" :D. However, as cool as it was, it took so freaking long to display the window I couldn't deal with it.
But this isn't the reason I bring it up today. I wanted to make note of the fact that Launchy has recently released a Linux version, bringing the power of keystrokes to the GNU desktop.
Launchy provides a .deb package for Linux distributions whose package management is based on dpkg or apt-get. They also provide a source tarball which can be used to build just about anywhere else. My preferred Linux is Gentoo. Some say this is because I like to suffer. Gentoo's package management system is based on ebuild files which are a set of instructions for retrieving source, patching, configuring, and compiling. To this end I decided to install Launchy on Gentoo legitimately, using an ebuild and an overlay.
Included in this zip file is a folder which can be unzipped into your portage overlay and installed using emerge. If you do use it, you should note:
The Launchy portion itself depends on qt4, while the calcy plugin requires Boost. Since Launchy can be built without calcy, I have set this in the ebuild as a USE flag. If you would like calcy, make sure to add 'calcy' to your USE flags before emerging launchy.
As an interesting note, with any luck you may not have to go through the trouble of creating an overlay for this as the ebuilds and associated patches have been submitted to Gentoo's bugzilla to be added to portage. (YAY!)
The bug can be found here.
Vote for me!
P.S.: My good friend, Sam, has offered me some of his bandwidth and hosting space. I will be hosting all future packages and patches on his server. Check out his stuff at www.samplusplus.com He does webdesign and also makes sweet little desktop enhancement applications like Jango Desktop.
That is all.
--PXA
For those unfamiliar, Launchy is an open source keystroke launcher for Windows. Effectively a clone of the incredibly useful OS X tool Quicksilver. Launchy binds to a global shortcut key combination (defaults to alt+space) and then indexes the links in your start menu as well as others, allowing you to simply begin typing the name of the program you'd like to run and then hitting enter when you've given Launchy enough to work with. Launchy also learns what your common shortcuts are, so the first time you need to launch Firefox, you'll probably need to type almost the whole thing. However, after a few weeks you'll be able to launch Firefox by typing "f" into Launchy.
I have previously made the statement the Executor was better because it allows custom keywords to be set in the application so you can configure it to...say, run Internet Explorer when you type "turdpile" :D. However, as cool as it was, it took so freaking long to display the window I couldn't deal with it.
But this isn't the reason I bring it up today. I wanted to make note of the fact that Launchy has recently released a Linux version, bringing the power of keystrokes to the GNU desktop.
Launchy provides a .deb package for Linux distributions whose package management is based on dpkg or apt-get. They also provide a source tarball which can be used to build just about anywhere else. My preferred Linux is Gentoo. Some say this is because I like to suffer. Gentoo's package management system is based on ebuild files which are a set of instructions for retrieving source, patching, configuring, and compiling. To this end I decided to install Launchy on Gentoo legitimately, using an ebuild and an overlay.
Included in this zip file is a folder which can be unzipped into your portage overlay and installed using emerge. If you do use it, you should note:
The Launchy portion itself depends on qt4, while the calcy plugin requires Boost. Since Launchy can be built without calcy, I have set this in the ebuild as a USE flag. If you would like calcy, make sure to add 'calcy' to your USE flags before emerging launchy.
As an interesting note, with any luck you may not have to go through the trouble of creating an overlay for this as the ebuilds and associated patches have been submitted to Gentoo's bugzilla to be added to portage. (YAY!)
The bug can be found here.
Vote for me!
P.S.: My good friend, Sam, has offered me some of his bandwidth and hosting space. I will be hosting all future packages and patches on his server. Check out his stuff at www.samplusplus.com He does webdesign and also makes sweet little desktop enhancement applications like Jango Desktop.
That is all.
--PXA
Tuesday, September 23, 2008
YOU'RE DOING IT WRONG! Part 3a: Intersections
I haven't written a YOU'RE DOING IT WRONG in quite some time now, and most of this whole time I've been getting pissed at more bad driving habits...and some of the same old ones.
One topic that I've been thinking about quite a bit is intersections. As a driver and as a pedestrian. They're just another thing that it seems like the driving community can't figure out.
So part 1 of intersections is the pedestrian perspective.
I tend to cross the road 2 or 3 times a day, due to the retarded parking situation at RIT, and I HATE doing this when there are cars on the road. Not that I worry about getting hit or anything like that, I HATE the way other drivers react to pedestrian intersections.
We're all taught pedestrians have the right of way. Unfortunately this combines with the modern driving tendency of relentlessly giving up the right of way when they shouldn't be (in the name of COURTESY) and you have people in command of ~5,000 lbs vehicles wearing their break pads and wasting energy (read: GAS) to stop their cars in intersections they could have CROSSED before a pedestrian got to it.
So this whole wasteful habit comes from an overdone forced politeness that society is too fond of today. But it's actually very rude.
Because you stopped your car before I even got NEAR the intersection, because you were so scared of my pedestrian ass feeling offended at you blasting your car past me now I need to hurry up and jog past you so I don't make YOU wait.
You would get pissed off at a driver who stopped at a green light because there was another car 40 feet up the road.
I'm pissed at you stopping at a crosswalk when I'm still 10 feet from the road. Seriously. If you can make it through before I get there...or HEY if your passing would make me wait a whole 3 seconds...do it. It's easier for me to stop 260 lbs than it is for you to stop 6,400 lbs.
Learn to judge distance, if I'm 10 feet away I'm NOT in trouble. LOOK OUT for pedestrians, but stop this overly polite bullshit and drive your damn car.
This installment of YOU'RE DOING IT WRONG is brought to you by Sudafed.
--PXA
One topic that I've been thinking about quite a bit is intersections. As a driver and as a pedestrian. They're just another thing that it seems like the driving community can't figure out.
So part 1 of intersections is the pedestrian perspective.
I tend to cross the road 2 or 3 times a day, due to the retarded parking situation at RIT, and I HATE doing this when there are cars on the road. Not that I worry about getting hit or anything like that, I HATE the way other drivers react to pedestrian intersections.
We're all taught pedestrians have the right of way. Unfortunately this combines with the modern driving tendency of relentlessly giving up the right of way when they shouldn't be (in the name of COURTESY) and you have people in command of ~5,000 lbs vehicles wearing their break pads and wasting energy (read: GAS) to stop their cars in intersections they could have CROSSED before a pedestrian got to it.
So this whole wasteful habit comes from an overdone forced politeness that society is too fond of today. But it's actually very rude.
Because you stopped your car before I even got NEAR the intersection, because you were so scared of my pedestrian ass feeling offended at you blasting your car past me now I need to hurry up and jog past you so I don't make YOU wait.
You would get pissed off at a driver who stopped at a green light because there was another car 40 feet up the road.
I'm pissed at you stopping at a crosswalk when I'm still 10 feet from the road. Seriously. If you can make it through before I get there...or HEY if your passing would make me wait a whole 3 seconds...do it. It's easier for me to stop 260 lbs than it is for you to stop 6,400 lbs.
Learn to judge distance, if I'm 10 feet away I'm NOT in trouble. LOOK OUT for pedestrians, but stop this overly polite bullshit and drive your damn car.
This installment of YOU'RE DOING IT WRONG is brought to you by Sudafed.
--PXA
Wednesday, September 10, 2008
More Cisco Linux VPN problems
I have noticed another issue with Cisco's VPN for linux, this time in the form of a module that inserts fine but won't connect. /etc/init.d/vpnclient_init status reports a good module but the interface can't be found.
When I saw this my first inkling was to see if I could change the name of the interface it's looking for in the initscript, this made status report good but the client still won't connect to anything.
This is because Cisco, in their infinite "wisdom" decided to hard code the name of the interface into the driver itself.
Your best bet is to figure out what udev rule is forcing the rename...it's probably in the file /etc/udev/rules.d/70-persistent-net.rules
Only other option is to rewrite parts of vpn_ioctl_linux.h to change the device name the driver tries to use to the one it's getting anyway, or change the MAC address and hope /etc/udev/rules.d/75-persistent-net-generator doesn't mess with your device when you reload the module.
Matter of fact, it'd be a cool patch to change those on the fly.
Hmm,
--PXA
When I saw this my first inkling was to see if I could change the name of the interface it's looking for in the initscript, this made status report good but the client still won't connect to anything.
This is because Cisco, in their infinite "wisdom" decided to hard code the name of the interface into the driver itself.
Your best bet is to figure out what udev rule is forcing the rename...it's probably in the file /etc/udev/rules.d/70-persistent-net.rules
Only other option is to rewrite parts of vpn_ioctl_linux.h to change the device name the driver tries to use to the one it's getting anyway, or change the MAC address and hope /etc/udev/rules.d/75-persistent-net-generator doesn't mess with your device when you reload the module.
Matter of fact, it'd be a cool patch to change those on the fly.
Hmm,
--PXA
Subscribe to:
Posts (Atom)