Blog Stats
  • Posts - 27
  • Articles - 0
  • Comments - 3
  • Trackbacks - 1204

 

Programming

Software development/computer programming thoughts.

Digging For Requirements

I think my favorite programming book of all time is The Pragmatic Programmer. It was the first introduction I had to being more intentional with my programming. There were certain types of programming patterns that felt good, but I didn't know why. This book taught me why those things were good, what name people had given to those good things, and showed me the next steps to take in those areas of good. James Marcus Bach had a series of tweets on Tuesday that reminded me of the Pragmatic Programmer's section, "The Requirements Pit." I still haven't fully grasped...

Keep Local Copies Up-to-Date Automatically

A coworker sent me this today; this idea had never crossed my mind: Not sure if you’ve already got something setup to automatically update your svn checkouts, but thought I’d mention this.  I just created a .bat file: TortoiseProc.exe /command:update /path:"C:\Code\Path\to\Proj1" /closeonend:1 TortoiseProc.exe /command:update /path:"C:\Code\Path\to\Proj2" /closeonend:1 etc... Then setup a windows task to run the file everyday at 4:30am. No more out of date code! Well, that's cool.  Two benefits I see to this: If you happen to go for several days without checking in (not a good practice, but it happens) your chance...

Running Multiple AJAX Requests in Parallel

In some JavaScript I needed several independent items from the web server, and so I abstracted a solution for this into a jQuery plugin. After building the plugin I searched Stack Overflow and found a relevant question with some non-generalized answers, so I put my sample code up there. I'm posting a link to it here so I can find it when I need it in the future :) http://stackoverflow.com/questions/1060539/parallel-asynchronous-ajax-requests-using-jquery/3087699#3087699

Microsoft Small Basic Fun

After listening to .NET Rocks Episode 562, "Teaching Kids Programming," I downloaded Small Basic again to play around a bit. I uploaded a little triangle fractal program that's available here: http://smallbasic.com/program/?ZTR830 Here are a couple notables: The web-based view scales down the graphics, doesn't appear to support PenWidth, and doesn't draw as smoothly as the installed IDE does, so it's a little less nifty through the above URL. As far as I can tell, subroutines in Small Basic don't support parameters, which makes recursion a little more difficult, which makes fractals...

Drop a SQL column default constraint that has been implicitly named

CodeMinder: to remind myself of stuff that I usually have to look up each time I do it. Notice the unnamed default in the following line: alter table test add col1 int not null default 1 This creates a default constraint in the database that is named something like “DF__test__col1__182C9B23,” which is pretty ugly.  The last several characters are some sort of random-ish sequence, and will be different on everybody’s database.  The difficulty comes later if some needs to modify this table: alter table test drop column col1 You’ll get the error: The object 'DF__test__col1__182C9B23' is dependent...

Update a SQL table’s XML value to remove nodes

CodeMinder: to remind myself of stuff that I usually have to look up each time I do it. To delete all PersonAlternativeName nodes from XmlColumn of the People table: with xmlnamespaces( 'http://mydomain.com/person/extension/0.1' as px) update People set XmlColumn.modify('delete //px:PersonAlternateName')

The Bruce Lee Approach to Becoming Agile

"Learn the principle, abide by the principle, and dissolve the principle." - Bruce Lee I first saw this line in one of Ron Jeffries's sig lines years ago. It struck me then and has stuck with me over the years. I was reminded of it a few months ago when I read this observation about Scrum: The intention of Scrum is to make [an organization's inadequacy or dysfunction] transparent so the organization can fix them. Unfortunately, many organizations change Scrum to accommodate the inadequacies or...

Domain Driven Design (DDD): An Exercise in Value Objects

I’m reading the Eric Evans book on DDD and wanted to catalogue some notes as I’m going through it to help me clarify and solidify what I’m picking up from the book. DDD, as I understand it, encourages programmers to build a rich domain model of a system that is separate from the user interface and infrastructure (database, etc.) of the system.  The domain model is made up of three types of components: Entities, Value Objects, and Services. The distinction between Entities and Value Objects is a bit of a subtlety.  Here are some characteristics of something the...

Ignorance Is Bliss…

…in the short term.  In the long run, usually not so much.

You’ve gone too far…

How do you know how far you can take something until you’ve taken it too far… at least once? This little “proverb” (if I can call it that) has limited applicability, and could be grossly misapplied, but has some relevance to what I’m currently working on.  At the moment I’m designing a software system with an emphasis on SRP, the Single Responsibility Principle. The proverb accepts the tendency to over-apply something just learned.  In many cases this over-application is okay because you’ll never know how far you should take something until you find the upper limit.  In this...

Full Programming Archive

 

 

Copyright © Jason Pettys