Metacircular thoughts

October 16, 2007

Notes on learning the .NET framework

Filed under: Language pissing matches, Life, The Dark Side — metacircular @ 11:23 pm

What’s good, peoples? It’s been a while since I rapped at ya.

Because of my job, I’ve been learning VB.NET and the .NET framework.

I have yet to find anything really retarded. These are some notes mainly for my own purposes.

  • And and Or still don’t shortcircuit. You have to use AndAlso and OrElse. Lame!
  • Boxing and unboxing (converting between a primitive type and an object) can definitely affect performance if called many times. This isn’t surprising, but it bears remembering and repeating. Consider the following code snippet:
    
    Option Strict On
    
    Module BoxingTest
        Public Sub NoBoxing(ByVal i As Integer)
            If i = 5 Then
                Console.WriteLine("omg!")
            End If
        End Sub
    
        Public Sub DoBoxing(ByVal i As Object)
            If CType(i, Integer) = 5 Then
                Console.WriteLine("omg!")
            End If
        End Sub
    
        Sub Main()
            Dim n As Integer = 300000000
            Console.WriteLine(Now)
            For i As Integer = 1 To n
                NoBoxing(i)
            Next
            Console.WriteLine(Now)
    
            Console.WriteLine(Now)
            For i As Integer = 1 To n
                DoBoxing(i)
            Next
            Console.WriteLine(Now)
        End Sub
    End Module
    

    On my machine, the boxing function takes about 10x longer than the one that’s directly with value types. Something to keep in mind if you’re working on a performance-sensitive application with tight inner loops.

  • Generics and the other collections are nice. Generics seem to be really fast, faster than normal collections?
  • The specialty collections, such as BitArray are efficient and nice (I can twiddle 10 million bits in under a second on a 2.8 Ghz machine).
  • Visual Basic 2005 is C# in clown shoes.

June 26, 2007

Someone please make the bubble die

Filed under: Life, Politics, RIAs, The Dark Side, Web development — metacircular @ 11:38 pm

OK, we’re now deep in 1998-1999 territory with respect to Web 2.0 bullshit. Like the real estate crash, if you don’t see what’s going to happen in about 8-24 months coming a mile away you’re living under a rock.

Look at what’s on the top blogs, mang. Remember all those experimental psychology papers you’ve seen which make a pretty convincing, fairly scientific argument that people aren’t effective at multitasking? Disregard that and embrace meaningless phrases like connected mode: do stupid shit faster! That’s right. All the old facts (who has time for facts anymore?) are irrelevant. It’s different this time. Smug dipshits who can’t produce code wearing ironic t-shirts gather at parties and rub each other’s balls in a circlejerk of self-congratulatory praise. We are so awesome. We’re wiseguys. Everyone outside our incestual Valley echo chamber is a sucker.

Somehow, human nature has changed in the last three years: cool office + caffeine + slave labor = startup success! Or, alternatively: MacBook Pro + Rails + Ajax todo-list app = startup success!

Another forgettable blog proclaims non-chalantly: “…as businesses … get more productive to remain competitive…” The same message is everywhere: no one (an absolute) has time to do anything: (another absolute) read books (except masturbatory productivity ones), write coherent essays, or learn new things that don’t involve Javascript. The same people using motherfucking PHP talk about increasing productivity without a hint of irony in their high-pitched voices! Unfuckingbelievable!

OK, so proprietary vendor Z wants to lock users in to new platform C, which garners significant mindshare from developers busy locking people in to platforms A and B from proprietary vendors X and Y, and I’m supposed to be impressed? Ignore the fact that you can’t link to a single fucking thing in this RIA widget shit Z is pushing, and you can’t increase the size of the text, or use Firefox extensions on it, or do most of the things a web browser is currently useful for. Nevertheless: game-changing!

TechCrunch is a sea of forgettable names: PopSugar, Meebo, Cellfish, Jobster, Topix, Kiptronic, PicLens, Pixoh, Snipshot, Cumshot, Gazeebo, Dildo, whatever. That sinking feeling in your stomach and glaze in your eyes as you read those names is the knowledge that this has all happened before (and that it doesn’t have to be like this). Yes, it’s not as insane as it was during the first bubble. But there are still millions of dollars going after companies that can’t possibly actually have, you know, customers, revenue, the stuff that actually sustains business. This Valley-blog-startup-TechCrunch-iPhone-Digg bullshit is not indefinitely sustainable. Like Sarah Connor stuck in her Armageddon nightmare, you can pound against the fence and scream all you want, but the mushroom cloud is coming, man.

Look, you little Bay Area-dwelling, public transportation-using, podcatching, bespectacled too-cool-for-cool circlejerk pricks: calm the fuck down. Chill the fuck out and read a computer science textbook. Learn a functional/concurrent/logic programming language. Read Steve Yegge. Face the fact that your startup, rather than being “game-changing,” is boring and banal, just like most businesses; what matters is whether revenue - expenses > 0 or not. Learn how code generation in a modern compiler works. Make a toy operating system. Learn how the CLR in .NET works by reading books, documentation, and examining IL bytecode. Tinker with OpenBSD and write a solid technical article about what Mac OS X/Linux users could learn from it (crypto? firewalls? there has to be something). Do something real for once, for fucks’ sake! Do something a bright teenager could grasp the outcome of but when asked how he’d do it would scratch his head and say, “uh… hm.” REAL! And I’m not talking about robotic toys that don’t do anything interesting from a science/engineering perspective! And no data center/sysadmin shit that only applies to web hosting companies who are hosting 50 terabytes of data, nor something a smart 15 year old kid could do in a weekend in between Bangbus marathons. You’re driving me nuts. Less TechCrunch, more Fog Creek. OK?

(Am I just jealous I’m not on the gravy train? Uh, obviously.)

May 11, 2007

Easter egg in SWI Prolog

Filed under: Life, Prolog — metacircular @ 11:46 pm

?- True.
% ... 1,000,000 ............ 10,000,000 years later
%
%       >> 42 << (last release gives the question)

April 17, 2007

Bliss

Filed under: Life — metacircular @ 4:48 pm

A great burden has been lifted.

Fuck TechCrunch. Fuck Ajax and all this other buzzword bullshit. I’m going to spend some time creating some real software.

(I got a job that has nothing to do with web development. How you like them apples?)

Next Page »

Blog at WordPress.com.