Sometimes C# just torques me off. Especially when it doesn’t give useful errors. I wrote the following line of code:
if (((string)e.Row.Cells[3].Value = "Yes")) {}
Which of course should have been:
if (((string)e.Row.Cells[3].Value == "Yes")) {}
The errors I got were:
The left-hand side of an assignment must be a variable, property or indexer
and
Cannot implicitly convert type 'string' to 'bool'
Why can’t it just say:
Hey stupid C#-wannabe former-VB.NET-programmer, you meant '=='.
Instead I spent 5 minutes trying different things before I noticed the typo.
D'oh!
Recently, I’ve been giving the Pandora music service a try. Originally I had briefly scanned a post by Steve Pavlina about it, but I didn’t really consider it much. I was pretty happy with iTunes and didn’t see what the difference from iTunes radio was.
Then I heard a podcast from Amber MacArthur and Leo LaPorte on Inside the Net where they interviewed Tim Westergren from the Music Genome Project. He explained how the service worked and how it was different than traditional streaming audio stations.
The Music Genome Project takes a song and ranks over 300 different musical “genes”. They rank things like the use of minor key, production quality and even the vibrato in the singer’s voice. All of these factors create a “DNA structure” for the song.
I surfed on over to Pandora to check it out. Pandora is really a flash application that streams music like a radio station. You select either a song or an artist and the stream plays other music with similar structures. You can tweak the stream by ranking songs as “thumbs up” or “thumbs down”, so it gives you an opportunity to tweak the parts of music that you like or find similar music. Ever since “No one knows” by Queens of the Stone Age came out, I’ve wanted to find songs just like it.
When I first signed up, I chose the song “Pull Me Under” by Dream Theater. Based on the heaviness in that song, Pandora chose “Snap your fingers, snap your neck” by Prong. I was impressed — I like both of those songs. My friend Steve will be appalled. He thinks Dream Theater is unequaled and Prong are talentless hacks. Nonetheless, the song structures are in the same vein.
The only drawback I see is the ability to see the criteria used and tweak the parameters manually. Knowing what makes a song you like could help you manually find more of the same. I created a radio station for KJ-52 and TobyMac, two Christian rappers. It found music similar in style but I would have rather been able to tweak the options for what I consider to be distasteful lyrical content. I did find some interesting things I didn’t consider, though. For example, Fates Warning is closer in style to Anthrax than it is Dream Theater.
The player will let you skip songs, but there is a limit to the number you can bypass. This is due to the licensing agreement Pandora must comply to as an online radio station.
Overall, its a very cool site. I haven’t found any new bands because of the stations, but that seems to be a function of the amount of music archived at this time. Perhaps as time goes on this will be a fantastic service.
Our youngest is crashed out on the couch getting over a nasty cold. The oldest is at his Papa’s, and the wife is at work.
That means Nerd Time™ for me! w00t!
I never get a night to myself without some obligation. Truth is, there’s probably some obligations around here somewhere, but I just can’t seem to find them. Having a free night reminds me of days of yore living on my own. I’d camp out in front of the computer with cheese, crackers and beer — surely a feast fit for a king.
Tonight is just like that, only instead of cheese and crackers its home-made chicken parmesan made with my wife’s secret recipe. Instead of beer its a nice garden salad with cherry tomatoes and mandarin oranges.
Just like it!
Its interesting to think about the different websites a person visits over the years and how they wax and wane as moods and tastes differ. I used to read Metafilter quite religiously. But since the advent of bookmarking sites like del.icio.us and company, Metafilter has dropped from my regular reads.
So to has the veritable Slashdot. Slashdot used to be a place with interesting posts about all things tech. I loved that site so much I even got one of the t-shirts a few years ago. Unfortunately, I think the quality has dropped significantly there. The mass that is the slashdot crowd has grown to be too sarcastic. Most of the posters don’t read the articles and comment only on the headlines and blurb while others fall into “I posted first” crowd. Neither lead to very good conversation. There is a moderation system in place which should allow the good comments to rise to the top, but it doesn’t seem to work.
Slashdot has simply lost my attention. I’d rather get my tech news from great, smaller sites like Gadgetopia or Signal vs. Noise. Their coverage seems to be as thorough as Slashdot, but they are missing the smarmy attitude and the throngs of unwashed nerds.
Slashdot has been moved to the “Probation – Decay” folder in my RSS reader and I’ve moved its refresh rate to “never”. I might check it out once in a while yet, but I have no plans to waste my time there any longer.
Its a sad day, but time waits for no site.
Another follow up to Removing an uninstalled .NET service, I ran into a problem where installutil kept giving me an error:
InstallUtil.exe is not a valid Win32 application. Annoying.
I found an post on Randomize that listed some of his(?) issues he saw when building a Windows Service. I think I was unable to unistall the service because of all the spaces in the path, but I seem to remember that I’ve always put my service in Program Files. That obviously has a space in it.
From Randimize’s link, I found another interesting article on how to get a description listed in the services console. I haven’t had an opportunity to try it out, but I will probably include it in the next windows service I need to build.
As it turns out, I’ll have to use my original technique of hacking the registry. Even after reinstalling the service, the problem was happening again.
I keep coming across these “kids” that have made themselves tons of money in very entrepreneurial ways. Most of them are under 25 so while they have the utmost of my respect, they make me ill at the same time. They make or have made more money than I have and their still 10 years younger than I. It certainly gives me the feeling that I’ve been wasting a whole lot of my life up until now.
Mouseketeer
Jupelo is 19. He’s graduated from high school and is taking a year off before heading off to college. What’s he doing for that year? Spending $100,000 at Disney World. He’s going to spend six days a week at the theme parks in Orlando while staying at the resorts. In addition, he’s spending some of the money to build a collection of Disney memorabilia that he’s going to use to create a children’s charity.
Where did Jupelo make his money? According to his site:
The money came from 3 business I have owned and operated since I was 13 (well, 2 were started when I was 15).
When I was 15 I was busy trying to skateboard away from the cops and trespassing on all the good skate spots. At 13 I probably wasn’t doing much of anything.
Spacer Gif
The Million Dollar Homepage’s owner has finally sold out the final 10×10 pixels on his page. Alex Tew is the site’s host and the idea came to him while considering ways to finance college. He’s gotten quite a bit of viral marketing and a significant amount of mainstream press as well. With the final pixels sold on eBay, he’s made about $1,037,000. It must be one nice university he’s attending.
Mr. Tew wins the prize for the dumbest idea most brilliantly executed. The startup gurus out there are always talking about how ideas aren’t worth the trouble of signing a non-disclosure agreement and that execution is everything. Mr. Tew’s idea was probably thought of and rejected by thousands of people. Even I’m kicking myself for not thinking of something so simple.
Revenge of the Bean Bag chair
Finally, Justin D’Angelo has been reviewed by CNN Money for selling Poof Chairs which are simply next-generation bean bags. He makes $150K per year and works about 1 hour per week. His products are outsource manufactured and drop shipped directly to his customers, so his business doesn’t require much of his time.
There’s no such thing as stupid ideas
A friend and I were discussing these entrepreneurs, and we wondered when they had time to play video games. I quipped they could play when they’re 33 and retired. Meanwhile I’m 33 and just thinking up some ideas. I’ve learned from reading about these businessmen is that there are no bad ideas (just some that are better than others) and that it is never too late to start.
In a followup to the previous post, the code listed there will work for user controls when they are located on the master page itself.
However, when the user control is the default content inside a placeholder, an extra .FindControl() needs to be done to get the placeholder, and then the user contol.
So if the user control is in the placeholder:
<asp:ContentPlaceHolder ID="Placeholder" runat="server">
<uc:ToolBar runat="server" id="Toolbar"/>
</asp:ContentPlaceHolder>
You need to reference it like this in the child page’s code-behind:
UserControls_ToolBar Toolbar = (UserControls_ToolBar) Page.Controls[0].FindControl("Placeholder").FindControl("Toolbar");
(hat tip: Jeffrey Palermo)
Here’s a link to a list of all the events that fire in ASP.NET 2.0 page’s lifecycle.
I love the idea of master pages in ASP.NET 2.0. They provide a standard look and feel for web applications that work much better than the old “include” model.
Sometimes it still makes sense to have a user control embedded in the master page. In particular, toolbars and navigation items may be reused across master and other non-master pages. Here’s how to access the user control on the master page:
On the child .aspx page, add the following:
<%@Reference Control="~/UserControls_Toolbar.ascx" %>
This allows the control to be referenced by the child.
In the code behind for the child you can now retrieve the object using:
UserControls_ToolBar Toolbar = (UserControls_ToolBar)Master.FindControl("Toolbar");
From there you can reference any properties on Toolbar as normal.
Its also recommended to create public property references on the master page for easier access to the user control (via Kiran Chand).
The first time I used the Internets in any capacity (other than email) was in 1994.
During a trip to Chicago over spring break, my interest in virtual reality (VR) was peaked. I tried a helmet-based VR simulator in which I could “walk” around. When I turned my head, the virtual environment turned to show me what I saw. It was hands down one of the coolest things I had ever seen: crappy graphics, slow refresh rates and all.
When it came time to choose a topic for a speech and report in a technology class, I had my topic. Immediately after class I headed for the library and checked out every book they had on VR. This left the other girl doing VR as a topic without much to go on, but it wasn’t enough for my report either — I didn’t quite have enough information.
A friend in one of my computer science classes pointed my to an FTP site at Berkeley that had quite a few articles on VR. I downloaded everything I could find. It made a great report, but my only complaint was the amount of time I spent searching through directories, downloading compressed files, opening them and seeing what was there.
Most likely, it was the same friend who later showed me the OmniWeb (?) browser and some of the first web pages on the net. He pointed me to his own home page, hosted on his university account.
Suddenly, my interest in VR vanished.
The idea of publishing my own information filled my head with thoughts of world domination. I had a photocopied zine, of course, and being able to publish it for millions to see was a thrilling thought. I saw the power of the www and it was amazing. I built my own university hosted website, complete with .TIFFs that didn’t work on any other browser; but I learned what made a website work… one tag of HTML at a time.
My first job after college was based on my knowledge of web technologies; and I’ve since followed the standards and leading edges of web. I’ve studied HTML and built tableless webpages before it was done by any corporate pages. I’ve built B2B websites and crafted CSS-based sites for clients. I’ve used my abilities to created software products that generate income for customers and reduced their costs.
I read endlessly.
And did nothing.
My goal is to make 2006 different. I’ve watched the Internets grow by leaps and bounds since those first days of wrangling HTML 1.0. Now I want to give back. I’ve learned a lot but want to help others learn too. Hopefully, I can generate some income at the same time. It’d be nice to become a full-time blogger, but that’s not my goal this year.
My posts won’t all be about technology. I’m not just a programmer, after all. Expect to see some about my faith, my role as a husband and father. There will also be posts about whatever else happens to strike my fancy that day.
Update: [20006-01-27] I originally posted this when I started my blog over on blogger. I’ve kept it here, even with the Spectacularity archives so it might seem out of place 200 posts in ;-) Also, just for the record, I did take most of 2005 off from writing Spectacularities as I wasn’t doing them justice and had much more on which I wanted to write.
