Tuesday, April 22, 2008
Static Variables in Shared Libraries
This is however, something I can never seem to keep straight in my head, so I'm throwing it out here to keep track of it for myself and possibly others.
How Static Variables within Shared Libraries (C or C++) Work Under Linux
Static variables within shared libraries for the most part work exactly as they do directly in an executable, on a per process basis. There is no consistency of value between multiple processes using the same shared library.
Each process will have all static data within these shared libraries initialized to zero, and then their scope will be maintained throughout the lifetime of that process, independent of other processes.
I have tested this empirically and found it to be true, and in line with how I theorized that it worked. If you know otherwise and can explain it to me (and shatter my understanding of the world) - I would love to hear it.
Wednesday, December 26, 2007
Super-cool web goodness
Lifehacker pointed me today to a site that allows you to take fully-interactive snapshots of any website. By snapshot, I mean it is literally as if you snagged a piece of the site verbatim. The throwback part is that it possible to create it as an image map, not just an actual graphic. All hyperlinks and images, as well as layout, are completely retained.
Obviously, there are some copyright issues to consider here. This is substantially different than just linking to a page. However, if you own the content, this is awesome. Here's a snapshot from this blog to show as an example:
I was initially just going to add this to my Google Reader shared items, but decided it was just too good and needed to be posted. However, I thought I would throw in here how much I am digging Google's new feature that shows your friend's shared items right in reader. It lets me basically have a feed of things I probably wouldn't run across, and they are from people who have mostly similar interests to my own. A very nice addition.
Saturday, November 24, 2007
UI Consistency
First, I think that Ryan notices UI components more than is healthy for the average human being.
This is actually a good thing though, and it usually Apple is the company who takes care of this. Is diversifying their product line taking its toll? Are they losing attention to small details such as this? Not sure.
I really don't think there needs to be more than perhaps 2 types of sliders. Shouldn't we be able to figure out pretty quickly if circles, triangles, or squares are the best marker? In reality, how does pushing a triangle or square down a round tube make sense? Stick with the round markers.
Given that we know the marker, I think the only thing that might change is dependent on whether transparency is allowed or not -- Ryan mentions this as well.
In general, these are the type of thing that get overlooked, and in the grand scheme of things
won't really hurt a product. Conversely though, paying some attention to these details can lead to a highly coherent and strongly-branded product (that which Apple has done the best at in recent years). Also, as Ryan mentions, usability can be greatly increased even with new products if a consistent UI is presented.
It takes a strong attention to detail, and some time commitment from a company to address these issues. However, overall it is one of the most cost-effective ways to increase marketability and sales of product.
In my opinion, the cover flow (and perhaps the new DVD player) slider is the best. I like a very unobtrusive slider that only shows when I need it, with the rounded slider. Buttons can be reduced to three, the play/pause, and a previous and next. Anything else is auxiliary and be hidden behind a click or menu, or perhaps available in a separate interface.
Thursday, October 25, 2007
What's old IMAP is new IMAP again
Now, suddenly, after Gmail introduces this feature it suddenly comes off as the newest and coolest thing around. Amazing. In my mind (and apparently a sentiment shared by others) it is long overdue. I actually wanted to switch the domain for one of my email addresses to Google Hosted a while back, and the lack of IMAP for use on my friend's cell phone was the reason we couldn't.
So, I now am so stuck on the gmail web experience that I really have no use for this feature, but since it was on one of my accounts, I decided to give it a whirl.
Overall, it looks like they have done a very good job with it. I think it appears to function well and I think all of the logistical questions that I have are now answered. Here are my thoughts.
The Good
- Labels show up as separate IMAP folders. Better still (and to answer one of my main questions), if you tag something with multiple labels it shows up in multiple folders under IMAP. Very nice.
- Inbox and folders are shown at the top level, and then hidden under a [Gmail] folder is essentially the folder list from the left-hand side of the web interface. Thus "all mail" and friends are available, but nicely hidden.
- Refer to #1. Now, try to go the other way. Dragging a message into a folder will automatically add that label to the message in gmail, copying to multiple will add all of them. Very slick.
- Remember Gmail's fantastic idea that you never delete anything, you just archive it? Fantastic idea, I've raved like a lunatic about the value of data for a while now, and I use this as a shining example of how to do it right. Until you have to fetch all of those headers over IMAP... Outlook (my unfortunate choice of IMAP client) froze completely for about 10 minutes trying to pull this off. Most of that is Outlooks fault though. As long as you never fetch the headers for the "all mail" folder, this shouldn't be too terrible (maybe).
- This actually isn't anything against Google, it is against Microsoft. It turns out there wasn't as much bad as I expected, so this is filler. I setup the account in Outlook to use IMAP, and I happen to have a gmail address that is "something.somethingelse@gmail.com". Outlook politely warned me that my email address looked invalid, but then happily continued and worked perfectly. Morons. Reminds me of when BestBuy.com couldn't handle the hyphen in one of my email addresses. Read the email RFC's guys, this isn't hard.
Tuesday, September 4, 2007
Pain and Suffering - Courtesy of Redmond
I was attempting to install Silverlight. I'm not really going to even get into why, that's not important at this point.
The important part is that after downloading and running the installer, it stopped with an error at 90%. The installer splash screen then pointed me to this incredibly helpful error page: http://www.microsoft.com/silverlight/help.aspx?errorID=2. Once my head quit spinning, I started investigating a bit more. Obviously, the error page didn't help in the slightest, it was actually completely out of date. I tried moving the file, extracting it manually, various things did not work.
Amazingly, I did actually find the problem, thanks to a point where I had moved the installer to my root c: drive, but the temp folder still magically showed up on my desktop with a reference to s:.
It is at this point that I should mention a cool little trick I have setup on all of my Windows machines. I create a batch file that runs automatically at startup, using the old dos "subst" command to map a drive letter to my desktop. Yes, I was adept at tab-completing the full profile name (documents and settings\username\yada yada), but it's much nicer having it as my s: drive.
So, seeing the s: drive in the error message tipped me off. I deleted my shortcut drive, and lo and behold it all worked. Bizarre.
If you've read this far, you probably need professional help. I'm still in denial.
Wednesday, February 21, 2007
The Missing iTunes Feature
One thing that has annoyed me about iTunes in the past was that I couldn't export a playlist, smart or otherwise, in a standard playlist format (I'm calling m3u the de facto standard here). If for no other reason, than it would be nice to have the ability to backup my playlists should my library ever decide to crash.
So, I was very happy to find this morning that someone wrote the program that I had on my "to do" list. Here is the iTunes playlist exporter. It will allow you to export your playlists in .m3u format, just as I wanted. Sweet.
Monday, November 27, 2006
The Unholy Trinity
The unholy trinity I speak of in the title is a combination I stumbled upon tonight with much glee on my part. Apple iTunes COM SDK + JavaScript + Windows Scripting Host. I know, you're probably wondering what the hell kind of medicine I am on, playing with Windows scripting. I had never touched it before tonight either. JavaScript and I have a longterm love/hate relationship as well. I love to swear at it endlessly for its annoyances and lack of ease of debugging, while hating how often it ends up getting the job done for me.
That all said, this combination has just allowed me to do some kick-ass things with iTunes. I had the SDK downloaded for some time, and I wrote some sample C++ apps when I first got it. However, after seeing the Apple JavaScript examples I decided to experiment with them a bit. I'm thoroughly impressed now, similar to Unix shell scripts (although orders of magnitude less powerful), I find that I can just get a task done very quickly, as opposed to writing a full application. Quick and dirty is the key here.
I currently have some scripts to perform some actions I had been meaning to do. Remove any dead tracks from my library, and cleanup bogus comments on some of my tracks. If anyone is interested, I can give them the scripts.
Now, for the challenge. Come up with some task/feature that you would like to do with your iTunes library that you can't quite seem to make happen with playlists. I'll see what I can do about getting it done in a script.
Thursday, October 19, 2006
Apple - You Fail It
I've talked before (although I can't easily seem to search for where) about how much I want a nicely integrated system update service. All applications could tie into it to update themselves. Very similar to how I think backup should work. Let the system control it all, but each application can register with it, since who better than the app to decide what to backup or update.
Ryan has also said several times how ridiculous it is that due to the lack of this, every app feels the need to bundle their own updater. Apple it turns out is no exception. When iTunes 7 rolled around, Apple created something called Apple Software Update, and included it with iTunes. I groaned, but I thought, "Hey, Apple stuff is generally simple and just works." So, I installed it.
Then, after fixing a ton of bugs in iTunes 7, they released an update. I thought, "awesome, I'll have it automatically thanks to that update package, right?" Wrong. Not even when I tried to use it to check for an updated manually. Check the screen shot. The software updater doesn't have a clue, but iTunes itself prompted me to do the update.

Yep, that was the end of Apple Software Update. Promptly uninstalled.
I hope the next operating system that convinces me it is worthy of being installed finds a way to integrate these services that I want.
Sunday, September 3, 2006
New Hotness
I researched a bit for Ryan, and found that SVG animations are not slated to arrive until Firefox 3. However, I was reading up a bit on SVG, and not only found a really good resource, but some tricks to do SVG animation with Javascript. Check this page out for some good SVG information.
Saturday, September 2, 2006
What is old is new again
Moving on to music. Quick, when was the first rap song made? Okay, how about the first explicit rap song? No, n00bs, Kanye West and Jay-Z did not invent rap. However, I would have been way off base myself. I would not have guessed back in 1965 we had someone dropping the funky beats, in a very explicit manner, but it happened. Moreover, iTunes actually carries it: "Rap Dirty" by Blowfly. Give it a listen, I was amused/impressed.
More on music. I had heard of the Bonnaroo Music and Arts Festival in the past, and always showed no interest as it was primarily jam bands like Phish, who I like to listen to, but pretty much ignore. Who of all groups should happen to be at this year's event though? Blackalicious. That would have been awesome to see (especially if they had happened to bring along Lyrics Born...).
UPDATE: iTunes link fixed. I have also finished adding labels to all of my posts for 2006. Eventually I may tackle 2005 as well.
Cornocopia
This is my first post using the new, integrated blogger stuff. I switched my account over to the new beta site today. It's not quite perfect yet, and you'll notice a few things are missing on the blog front right now, but I have been pushing them to do this for so long I thought it would be hypocritical not to use it immediately.
I like it all for the most part. There is still a bit too much original Blogger lingering around, that I want to see eradicated by Google. I really like that I now simply use a Google account, there is no longer a separate Blogger account. The new template stuff is really nice, it borrows the nice aspects of Google Pages, but I still find it pretty extensible. Could use some more work still, but very much a step in the right direction.
I really like that they added label support for posts. I had some 3rd party label stuff I was going to integrate, but of course I never got around to it. This makes it easier.
I also today decided to take the plunge and install IE7 RC on my machine. This isn't all that big of a deal, as I only use IE for Windows Update now, but I thought I would check it out. To be fair, I also downloaded Firefox 2.0 beta, and plan to install that also. I know, I usually just want my software to work, and don't want to be futzing with it. Oh well, I was just on a kick today I guess. I'll have to post my thoughts on the two browsers after I use them a bit.
The Hawks won today. I hope to repeat that statement many times through January.
Oh man. The spellchecking on Blogger kicks butt now. About time.
Friday, September 1, 2006
Cleaning Out My Closet
Actually, my inbox.
Google as part of their new support for sending voicemails to people via Google Talk, created a very slick inline MP3 player that they use in Gmail. This led some enterprising individuals to find how to link that from any other site, and then of course the creation of a Greasemonkey script to do it automatically. Adam at Lifehacker actually created this script.
Now, something you wouldn't have heard 5 years ago. There is a freeware app that is available on Mac, but not Windows that I really want. Google has had the Gmail notifier for quite some time, but now on Mac only, they have the Google Notifier. This handles calendar as well as email notifications. The page links off to the Gmail notifier for Windows, but there is no Google Notifier available for that platform. Damn! Oh well, I need multiple Gmail profile support, so I will probably stick with Gmail Manager and Google Calendar Notifier extensions for Firefox.
Wednesday, August 23, 2006
Free (as in Ski)
I need something fun and frivolous. This will do.
I hope this needs no introduction. I hope that you had SkiFree on a Win 3.1 box back in the day. You loved the cheesiness, you really loved the abominable snowman that would come eat you. Yes, silly game goodness.
I happened to stumble onto the page for the game the other day. It turns out the guy was a Microsoft guy who basically wrote this as a side project. He retained rights to change the code, so he has built some new versions that work better with WinXP and such. Sweet!
Thursday, May 11, 2006
Q: The opposite of Microsoft Derivation?
Google today rolled out yet another pretty slick feature by allowing pictures to be added to contacts in gmail. That alone sounds kind of cool (not on my account yet, can't say for sure). Something new they have added that I haven't seen done before is the ability to suggest a new photo for people in your contacts to use. Just imagine the great conversations that could spawn: "Hey, Suzie, you should use this upskirt shot I have of you from last night at the bar".
Anyway, all of this leads me to a topic I meant to discuss some time ago. These features and apps that Google are writing are often nice (yesterday's announcements: trends, co-op, and desktop4 do not fall into this category). However, most of their new releases are simple incremental things, or stuff I find less than useful.
Instead of looking for new things, I would really like to see them do nothing but focus on integrating and tying together their existing services. I should have a single Google account, with varied levels of services and privileges. Why the hell should Blogger have its own login, or a separate publishing space even for that matter? Same goes for AdSense. The idea of a gmail account needs to go away, replaced by a generic Google account. That way, when something sweet like Calendar comes out, I don't have to tell people they need a Gmail account and have them stare at me like something out of V. Instead, I tell them they need a Google account. They nod their head and go, "Yeah, I like that search engine. I think I will."
There are some really killer integrations that a few of us have thought up. Imagine if Talk and Calendar were fully connected. When you were in talk and someone had a status of busy, you could hover over and see exactly what they were doing from their calendar, or at the very least how long they would be doing it (ceiling cat, you know what I'm talkin' about). Things discussed in chats, such as events, could be turned into appointments and added to Calendar just like that.
How about this, integrate Blogger, make it look like Google instead of ass, and instead of making templates something no mere mortal should try to create, use that simplified new Google Pages template creator to make the site.
Here's my favorite that I just came up with. All replies to my blog posts should be dropped right into my gmail account as well, as an unread, labeled thread. Then, when I reply to them, my comments can go directly back to the blog. Drooool.
Basically, I think Google has compiled enough good apps for now, but they could really make them unbeatable and draw in many more if they just spent the time to create some synergy out of what they have (yes, I used a marketing buzzword just now, but I used it correctly, so meh).
Thursday, April 27, 2006
Google - So Hot Right Now?
However, just as I think they are completely back in the cool department, they release Google Sketch. Go to http://sketchup.google.com [Link Fixed] if you don't believe me.
I downloaded it, but I haven't run it yet. Looks like any other of the free 3D software I have tried. It might be just fine.
However, why is Google releasing 3D software? Yes, I know Google Earth is basically 3D software, but that still fit in as a service, plus they got it by buying some other company. Where did this come from, and where does the breadth of Google begin and end?
Sunday, April 9, 2006
About Time
It seems to me that the 1.0x branch of Firefox did a reasonable job of keeping most extensions updated, at least those from either mozdev or addons.mozilla.org anyway.
Then, when the 1.5x (deer park) branch was being developed, there were promises of a much better updater for Firefox. It was going to more granular, allowing for only necessary pieces to be downloaded and updated, and it was going to be much more reliable. However, the only real change I have seen to this point is that my extensions now never updated on their own, despite screenshots such as this leading to believe to the contrary:

This wasn't going to last long though, so here is an extension which takes care of automatically notifying/updating when extensions are updated. Very nice.
I found this tip through Lifehacker once again.
Friday, April 7, 2006
Dump #2 - Boot Camp
This floored me. I never expected to see this announcement from them. I was barely shocked at all to hear that they were switching from PowerPC to Intel, and I fully expected that some people at that point would find a way to run Windows on the thing, but I never thought Apple themselves would endorse it.
At that point the questions really started.
1. How did they do it? Did they just steal the work done by the hackers going after the $13,000 bounty? Did they make Intel give them a reference BIOS? Did they create their own BIOS internally?
At this point, I would lean toward the latter. There is no way they would go use some hackers piecemeal code, and I'm not sure they would have even ran this by Intel. Bootloaders are not really that difficult, especially if you know the hardware and specification, and Apple would definitely have guys that fit both of those criteria. I'm sure the day the developers got an x86 board on their desk (about 5 years ago depending on what you read -- different topic) they threw together a BIOS and booted XP on the thing, just to prove it could be done. I would have.
2. Why? Apple has been notorious about protecting their overall system solution by keeping their hardware and software tightly coupled and under wraps. Are they now simply wanting to be a hardware company?
I think this answer may be the trickiest and the most interesting. It is possible they simply want to pick up hardware sales from the "switcher" market. Those people who are interested in Apple, but still have reasons to continue using Windows, and don't really want to have different machines for each. It turns out I fall squarely into this market. I really want an Apple machine at home, and I think I would wear out the iLife suite I would use it so much. However, I still need Windows for some tasks at this point, and I refuse to have multiple machines. This is truly sly, because over time I'm sure I would find replacement apps on the Apple, and grow tired of rebooting, slowing fazing Windows out entirely.
This is where the discussion gets really interesting. There has been much discussion that even if Windows XP were possible on the Apple, Vista will not be. Do a google search if you want to learn why or how, I'm not up to doing the research right now. However, if that is true, there is basically planned obsolescence for the Windows solution. If they get the people right now, when Vista comes out they won't be able to transition to it on the current hardware. However, the latest shiny new OS (leopard or greater) from Apple will absolutely run on it. Thus promoting users to simply abandon Windows at that point.
Overall, I really like how polished this solution looks from Apple. It's already very nice in beta, and will just get better when it is embedded into Leopard. Simple resizing of partitions should have been in Windows from day 1, but never was natively. Everything in typical Apple style just works and looks very polished.
I did see today an announcement of someone with some virtualization software to run Windows inside Mac OS. That is the only way to make this better. Let me quick jump over to run a Windows task without rebooting. I'll be watching this to see how it pans out.
Update: Check out Thaddeus's blog for another perspective on all of this.
Brain Dump
I show up today at work, and Google Talk is staring at me, with lots of doodads, and a message saying that there are new features available. I really like having pictures back, that is something I missed from MSN Messenger. I also like that you can now theme your chat windows, the original now really looks like crap.
2 things I find interesting. It seems as if pictures may be stored on Google's site, as I can see pictures for people who are offline (or at least unavailable, maybe that is the key). Also, partychat has a default picture, but it is slightly different than the default pictures for people using alternate IM clients (and currently down, big surprise there). Google, give us group chats, please.
Tuesday, March 7, 2006
Trials and Tribulations of Software
The first should have been obvious to me, being a Linux guy who has worked with servers for years, but Ryan was the one who figured it out. When I tried to download Ryan's sample .ics file, it just showed up as text in the browser -- pasted here for your learning pleasure:
BEGIN:VCALENDARThis is because our lovable Apache server did not yet have the proper mime type of text/calendar associated with .ics files. Changed that, and everything behaves correctly...or differently as it turns out.
X-WR-TIMEZONE;VALUE=TEXT:US/Pacific
METHOD:PUBLISH
PRODID:-//Thoughts Abound\, Inc//iCal 1.0//EN
X-WR-CALNAME;VALUE=TEXT:Example
VERSION:2.0
BEGIN:VEVENT
SEQUENCE:5
DTSTART:20060307T200000
DTSTAMP:20060307T011706Z
SUMMARY:Read Thoughts Abound
UID:EC9439B1-FF65-11D6-9973-003065F99D04
DTEND:20060307T210000
BEGIN:VALARM
TRIGGER:-P1D
ACTION:DISPLAY
DESCRIPTION:Event reminder
END:VALARM
END:VEVENT
END:VCALENDAR
I expected after making that change to now see the Firefox save-or-open dialog defaulting to Outlook, just as Ryan posted. However, I was surprised to see this instead:

Oh yeah, I have a beta of the Mozilla Calendar extension for Firefox installed. This is the same code they use for the standalone Sunbird client they are writing, it is just packaged as an extension to Firefox or Thunderbird. Sweet, another test case!
It's a good thing Calendar is still in beta, because this one is horribly lacking in the integration department. It defaults to creating an entirely new calendar for me, which is probably not what I want. However, it also does not allow you to add it to an existing calendar. Not only is there no drop down list of existing calendars to select from, but if you do manage to type the name of your calendar exactly, it creates a new one with an identical name. Bad, all bad -- get to work on this Mozilla guys. Here is a screenshot after it was added (click on it if it is too small to read):

Okay, so I disable the calendar extension and figure surely now I will have it go to Outlook. Sure enough, I get the open with Outlook dialog as posted by Ryan. Now, there is no way it can fail, right? Wrong. Ready for another screenshot?

I use the excellent freeware program IrfanView for viewing graphics files. The reason it is even trying to open this file and generating this error message, is because it has a file association for .ics files (hmmm, seems like we are in a roundabout way back to the MIME type issue). For all but the one person in the world who knew what a .ICS graphics file is, here is the association list from IrfanView:

Image Cytometry Standard Format. Rolls off the tongue nicely, doesn't it? Okay, so I uncheck that box, and now when I click on the file, everything works as expected and promised.
Wow, we have just seen a demonstration of how software is still not ready for prime time. Better stated, there is a gaping hole where integration is lacking in software, and that is where I think great strides (and possibly money) can still be made by developers. I shouldn't have to be a Software Engineer to figure out how to make this stuff work, but I do when stuff like this happens. That's alright, it just provides motivation to me to make my products that much better.
Now the preaching is over...
Friday, February 24, 2006
Hidden Coolness
However, the more interesting part to me is that cool stuff like this sometimes sneaks out under the radar. I have seen this occasionally before, where a company has built some really fantastic functionality into a product, but then does nothing to promote it. It slips out when a few people find it and spread its existence via word-of-mount.
My company has been notorious for that in the past. We would stock our products with tons of extremely useful features that then never got documented, or were just never promoted to the sales force or general public. You would then get people years later saying, "Man, I wish there was just someway to do this task...", and we would then tell them the exact functionality they needed had been there for years. It got extremely frustrating at times.
So, my point is, brag up your features companies, all of them. Anything Engineering sticks in there, add it to a list features somewhere.
Back to the point at hand, this new feature is extremely cool. Ryan has pointed me at a podcast to try, and also remixed his latest DJ mix into enhanced AAC format, rather than MP3. I will try them both out tonight on my 4G iPod to say if it works as well on there as it does on his 5G.
Experimenting on doing this with an M4P will have to be left to him, given that I can't run ChapterTool (no MAC in my house yet), and my complete lack of M4P files (thanks JHymn!). Given that it is just XML data, and a known AAC format, maybe I should look into writing a Windows app for this. If I then added .cue support, it would do everything Ryan needs as well.
Update: Works great with a 4G iPod as well. Very slightly different, but mostly the same. A website regarding all of my finding will follow shortly.