Good Frameworks like .NET, .NET MVC, and Ruby on Rails exist for a reason. So stop writing yours. Now.

by 6. July 2010 20:55

 

In the 10 or so years I have been a programmer I have run into a lot of “frameworks” in which to build an application. I’m relatively certain I even tried to write my own at one point or another. And, lets just be honest here, they suck. 

Here’s why:

Programmer Jack decides he’s going to write the Awesome Sweet Cool App 2.0. He’s making a 2.0 because the stupid, awful programmer before him (because you know the guy before you always sucks) wrote this thing. It’s a pain in the ass to maintain, it’s was written using AwesomeLanguage 2.4 and AwesomeLanguage 4.6.91 b1459 is out now. Either way, it’s a “complete train wreck” and Jack needs something scalable, future-proof, and maintainable. Jack toils endlessly writing a custom page handler, image handler, a form processor that will take his XML/XSL templates and convert them to XHTML forms and on submission they are sent to a custom form processor which uses a factory pattern to choose the right object to return that handles the form automatically.  All of the controls are automatically wired together so that the buttons bind to common events at runtime, and the application “just works”. FRICKIN’ AWESOME! Jack is a superstar, he beats the bad guys, he rescues the princess, and walks off into the sunset. 

More...

Tags: , ,

Development

My iPhone 3g, keep the Jailbreak, or upgrade to iOS 4

by 22. June 2010 00:59

Admittedly, I think that the jailbroken iPhone is awesome for all the wrong reasons.

I am a huge fan of hacked hardware. I have neither the drive nor the intellect to hack hardware myself so I have to rely on others to hack, then I just use their crap.

I jailbroke the iPhone for a few reasons:

  1. Backgrounder. At first I thought this would change how I used the iPhone. Over a short period of time I discovered that I used this very little, then I realized I NEVER used it. Then I deleted it. Background apps sound really great, particularly using Pandora Radio, but for me, I never really found a place for it. Leaving this device, like any, constantly streaming audio over wifi or 3g drains the battery like free pudding at fat camp.
  2. Winterboard. Being an artsy-fartsy guy I wanted the iPhone to look pretty. Prettier than it already did. This worked, there’s some battery/performance penalty, but it’s negligible and for day-to-day use it’s unnoticeable. Having 5-icons in the bottom dock is seriously great, as simple as it sounds it’s probably my favourite jailbreak perk. I’m easily impressed.
  3. QuickReplySMS. I never bought it, it’s $3. I guess two things influenced my lack of purchase on this one. First thing I don’t trust the iPhone Hack Community with my credit card. I could have taken a big pain-in-the-ass route and used prepaid but that’s just ridiculous. To me, these apps are hacks, not in a bad way, but they are being written by someone who is circumventing an established paradigm to make money. This strains my trust. No offense, I’m sure you’re all wonder and ethical people, but it ain’t happening. Secondly, I don’t know if I will keep the jailbreak, so this may be money in the toilet.
  4. Emoji. Turns out, this is already free in the App Store, who knew.
  5. Emulators. These turned out to be expensive, the free ones worked ok, but I was not impressed with the performance or the fact that my big, fat sausage-fingers covered half of the screen and these games were meant to use an unobstructed screen. More...

Tags: , ,

Apple | iPhone | Techie

If your device has a 5-inch screen and no phone, it's not a tablet, it's a PDA. Accept it.

by 16. June 2010 19:30

Lets get something straight here: Giving a device the label 'tablet' implies a few things...

  1. I'm going to ingest it
  2. I'm going to dissolve it in something
  3. I'm going to write on it (like paper)
  4. I'm going to read from it (like paper)

While your companys 5-inch, no-phone-having device may be amazing, it's not a tablet. It's a Personal Digital Assistant. 'But it's so much more..', no it isn't. It's a palm pilot in 2010. A tablet would be something like, for instance, the iPad, or the JuJu. There are special purpose tablets, like the WACOM drawing tablets... I'd almost call that a drawing 'pad', but I think tablet works there.

THIS (DELL Streak),on the other hand... NOT A TABLET, it's dinky, it fits in your pocket, you technically can read and write on it, but it's not a tablet... it's a PDA, and a mighty bad-ass PDA at that.

I'm officially putting a 7-inch minimum on screen size to be considered a tablet.

Tags: , , , ,

Complaining | Techie

Visual Studio Tracepoints, how did I live without thee?

by 28. May 2010 20:17

Straight from the "How have I been using this product for 8 years and never saw this?" files, I bring you the Tracepoint!

Typically when I need to dump values out, I will either put a label on a page and set the value, do a Response.Write(), or Debug.WriteLine(). Well today, for some reason I right clicked in the code in the IDE and went to the "Breakpoint" section in the menu, lo and behold I see "Insert Tracepoint". In a nutshell, this will let you dump data to the Debug Output window, much like Debug.WriteLine but without adding the extra code.

Pretty handy stuff, and a great alternative to adding debug code.

MSDN's info:
http://msdn.microsoft.com/en-us/library/232dxah7%28VS.80%29.aspx

Tags: , , ,

.NET | Development

1984 Starcraft

by 17. May 2010 17:55

I just saw this on Kotaku. Seriously impressed.

I hated StarCraft a lot, but this is really neat.

And the original:

StarCraft

Tags:

Video Games

Star Wars Figures, realistic actions

by 17. May 2010 00:54
My son just turned 5 and it was a Star Wars kinda birthday around here. Sometimes certain figures have "actions" that they do, like karate chop, etc. Paul and I thought it would be funny if the Count Dooku guy had an "action" button that made his head fall off. Today, my son found that you can pop not ONLY Count D's head off, but also his hands.... making him a perfectly accurate representation of the movie. What's interesting, my son has never even seen any of the movies and has no idea that Dooku gets his hands lopped off followed my a brisk headectomy.

Tags:

Payday Loans, Triple Z Seo Services, Spirinet Technology Services, and RapidShare can suck it, and are a scam.

by 13. May 2010 00:50

Here and there I go through and clean up the the mess that spammers leave in my comments. So... here's some free advertising courtesy of jerzakie.com!

RapidShare routinely leaves links to thier wiki page which is nothing short of a crappy advertisement. I wouldn't buy free money from them, and given thier advertising practices, leaving fake blog comments, neither should you. Up yours, RapidShare.

PayDay Loans: Again another spammer, I didn't save the URL because it changes all the time. SCAM!

Anything relating to SEO from Dubai: Again, crap, stop using my blog, all 4 of my readers arent going to buy your sorry-ass service.

[edit 5/20/2010]
... such as http://www.triplezseoservices.com/ who put a comment today that was trapped by my spam filter. Thanks for the great comment "Great I really like you work so much.". lame. And credit to Spirinet Technology Services for also leaving fake comments, you can contact dfads@gmail.com about that for fun and amusement!

Here's a quick guide: If you're going to spam my blog, I'll delete it. Leaving comments like "I really love this post, I've been coming here for a while, I tell all my friend to subscribe! Keep up the good blog!" are an automatic delete.

BlogEngine developers: PLEASE FOR GOD'S SAKE IMPLEMENT AKISMET! JUST UPGRADED TO v1.6... THANK YOU!

Tags: ,

Complaining

I'm just sayin.

by 30. April 2010 20:25

VGluZm9pbCBpcyB5b3VyIGZyaWVuZC4=

[edit for Gheri del la Cirque de Soleil....]

Tags:

Parsing Obsession

by 22. April 2010 07:40

This past weekend I had an interview in Austin, TX with a pretty badass company.
The architects hit me with a question that made me cock my head to the side like
a cocker-spaniel that just heard a violin. The question wasn't brain surgery, but
it was complex enough that it required a lot of though and I got a little obsessed.
I had to code it today.

Here was the question (not verbatim, but close):

Write a method that returns a list of strings from a line from a comma delimited
file. Here's the data:

Bill,Brown,"austin, tx", 123, """Jr."""

Output should be:
Bill
Brown
austin, tx
123
"Jr."

I started to pseudocode it using some regex, and they didn't seem to thin that would
work. I went a couple more routes. In the end we discussed and the one architect
said he had solved this by rolling through each character in the line. That seemed
like a perfectly reasonable way, but I was really hung up on a couple of things.

1.) I think that sounds like a lot of CPU cycles for this operation
2.) I wanted to do this without rolling through each character, because that's how I
    roll.


So today my OCD got the best of me... and here's what fell out:

1: using System;
2:     using System.Collections.Generic;
3:     using System.Linq;
4:     using System.Text;
5:     using System.Text.RegularExpressions;
6:     using System.Diagnostics;
7:    
8:     namespace TestLib
9:     {
10:        public class ParserThing
11:         {
12:            public ParserThing()
13:            {
14:                DateTime str = DateTime.Now;
15:                //string dirtyLine = @"Bob,Brown,""""Jr."""",""dayton,oh,N"",123-45-6789";
16:                string dirtyLine = @"Bill,Black,""""""Sr."""",,\/some/thing\/,"""",,""123 Street Ave.,West. SomeCity,OH 45454"",""000000-0000""";
17:                int executions = 100;
18:                List<string> words = new List<string>();
19:                for (int i = 1; i <= executions; i++)
20:                {
21:                    words = CleanIt(dirtyLine);
22:                }
23:                TimeSpan ts = DateTime.Now - str;
24:                Debug.WriteLine("Execution Time: " + Math.Floor(ts.TotalMilliseconds).ToString());
25:                foreach (string word in words)
26:                {
27:                    Debug.WriteLine("Word: " + word);
28:                }            }
29:            public static List<string> CleanIt(string rawLine)
30:            {
31:                const string QUO = @"""";
32:                const string DELIMITER = ",";
33:                List<string> retVal = new List<string>();
34:                List<string> tmpWords = new List<string>();
35:                Regex regx = new Regex(@"""{2,}");
36:                string[] words = rawLine.Split(new string[] { DELIMITER },StringSplitOptions.None);
37:                bool isInQuoteBlock  = false;
38:                StringBuilder finalWord = new StringBuilder();
39:                string tmpWord = string.Empty;
40:                string word = string.Empty;
41:                for (int i = 0, l = words.Length - 1; i <= l; i++)
42:                {
43:                    word = words[i];
44:                    tmpWord = words[i];
45:                    if (word.Contains(QUO))
46:                    {
47:                        if (regx.IsMatch(word))
48:                        {
49:                        tmpWord = regx.Replace(word, @"""");
50:                        }
51:                        else
52:                        {
53:                        tmpWord = word.Replace(@"""", "");
54:                        }
55:                        finalWord.Append(tmpWord);
56:                        if (word.StartsWith(@"""") && !word.EndsWith(@""""))
57:                        {
58:                            // this is a partial word
59:                            finalWord.Append(DELIMITER);
60:                            isInQuoteBlock = true;
61:                        }
62:                        else if (word.EndsWith(@"""") || i == l)
63:                        {
64:                            // this is the end of a block
65:                            isInQuoteBlock = false;
66:                            retVal.Add(finalWord.ToString());
67:                            finalWord.Length = 0; // clear sb
68:                        }
69:                    }
70:                    else if (isInQuoteBlock)
71:                    {
72:                        finalWord.Append(word + DELIMITER);
73:                    }
74:                    else
75:                    {
76:                        retVal.Add(word);
77:                    }
78:                }
79:                return retVal;
80:                }
81:            }
82:        }
Important to note: I wrote this in a pretty short amount of time. There's probably some shortcuts I could do in here, I don't like the if/else if/else use in this. I'm not going to spend any more time on this, but damnit it works, and it works well, and it's reasonably fast. On my box, I can parse 100k iteration in about 1200ms. ... I didn't get the job, btw, but that's ok, it wasn't the right time. I got to see Austin, and I got to interview at a really awesome place. I'm hating blogengine, btw, I need to change this blog to something else.

Tags: , ,

.NET | Development | How To

Parallels vs. VMWare Fusion

by 28. February 2010 21:41

Maybe this is an unfair comparison considering I am using VMWare 2 and Parallels 5. I have been a pretty firm VMWare fanboy for quite some time, but I have to say after using parallels 5 for a week now, I am frickin' SOLD. I have read that Parallels 5 is supposed to be faster, and it is, but WOW, it's a LOT faster. The biggest thing, though is the fact that it properly focuses windows of the guest OS when in Unity/Coherence mode. I am on an older MacBook Pro, it's a 2.16GHz Core Duo, with 2GB of RAM and a 7200 RPM hard drive. As I type this I am running Safari on OSX and Visual Studio 2008, SQL Server 2005 Mgmt Studio, and IE 8. There is... 5% CPU usage and memory consumption is hovering around 70% (and I have 768M allocated to the guest OS, which is XP SP3).

I'm seriously impressed. I think I see a competitive upgrade in my future :) And just for Gheri, yes  I installed VirtualBox, it's ok. It's better than nothing, it's a little lower performance than VMWare.

Tags: , ,

Apple


RecentComments

Comment RSS