Programming |
|
Clear Separation of ResponsibilityThe more I dig into web application offerings out there, the more I come to realize that there is a fundamental flaw that keeps re-occuring. There is no clear separation. Let me review a few areas of separation that should be a part of your next design. Extending instead of Overriding in PythonI taught myself Python last week, basically because I had a programming task that was not well suited to the existing languages I work with regularly, and frankly I just didn't want to get into C coding. Python is a very easy to read language, and it's not very difficult to write either. I did get a little bit worried about extending a method in an inherited class, rather than overriding the method. A basic paradigm surely, but with a new language I wanted to make sure I was doing it right. Here's what to do for all the other Python newbies out there.AI Outside the BoxI've been pondering artificial intelligence lately and how much power we have as programmers to develop artificially intelligent algorithms. 10 years ago when I thought of artificially intelligent functionality I had an entirely different perspective on things. Moving Past OOPObject Oriented Programming is a good way to do things. Though in hindsight it was a fairly obvious idea (which is what ensured such mass adoption), it was revolutionary. OOP has opened up the world of programming to many people who just wouldn't get it otherwise. But now that OOP and it's fundamental performance restrictions have become the mainstay, where do we go from here? I have a few ideas. Amazon EC2 BasicsSince I'm getting started with EC2, I have a lot of questions about how it works - both functionally and price-wise, so this blog entry reflects some notes that I've taken in that regard. Real ProgrammersIn 1983, I was versed in LOGO (you remember the language that you moved a turtle around the screen to draw) and BASIC. I also came to know "machine language" on commodore systems. I didn't actually have a commodore - but I did have access to a friends on occasion. COMPUTE! magazine used to publish the bytes of code for user-submitted video games, and because I didn't have access to a system with any sort of regularity (being at the mercy of friends and their parents who preferred we play outside), I would read through the code to look for problems and fix them - so when I did get access to a system for a few hours I would be able to actually play the games. This brings me to the story of a real hacker, this story was originally told on USENET in 1983 after one of those age old conversations about how FORTRAN was THE programming language to use. Funny how compiled languages somehow became the terrain of "real programmers". The Software Nobody is Talking AboutThere is a working piece of software out there that hasn't made much noise in the tech community just yet, but it is poised to be the biggest thing since PHP. (No offense Ruby, but Ruby seems to be all about noise with very little actually implemented). What does it do? Where do I get it? How much does it cost? (hint: it does everything, it's downloadable, and it's free). HTTP Success Codes You Should Know AboutEvery time I reference the HTTP spec or reference a book with a decent level of detail, I find something interesting. From my latest venture, I decided to share a few of the HTTP responses that I found interesting - especially from the perspective of somebody writing interactive web applications. Categorization and N-Dimensional SpaceWhen working with database centric applications - which describes most applications in the both the web centric world and the client-server space - you inevitably want to categorize data. Categorizations can be as simple as a keyword tag or something slightly more complex such as a tier-structured menu, a collaborative tagging or voting system, or an elaborate combination of multiple fields. These "simple" categorization systems certainly add value and do their job as far as structuring data, but what about predictive modeling? Perhaps you want to figure out what books a user might enjoy based on past voting history or maybe you want to make a knowledge base system more effective based on the self-help history of previous users. Removing Local Warnings in PerlWhen CGI programming, warnings can be a bit of a bugger. If they get sent to output prior to the HTTP headers, you end up with a 500 http error and most frequently a not very helpful "Premature end of script headers" error in your server log. Archival vs. Active UsageHigh performance database platforms, faster data storage, increased network bandwidth, and better CPU firepower allow more programmers to think of archival strategies as an afterthought. With all the technological advancements, an intelligent design surrounding data storage and access remains one of the most effective performance enhancement techniques available in scalable applications. Arbitrary Function Calls in JavascriptI have what should be a simple requirement - have a function that calls other functions. It should be simple, but it did take me a bit of time to figure out the details, so I decided to share. This solution will call functions contained within object properties of arbitrary complexity, and pass a variable list of parameters correctly, binding either no object or an arbitrary object to the function (for passing the this keyword appropriately). Separation of Powers in the Programming WorldBuilding reusable code elements requires a bit of forethought. Functions and objects need to be abstract enough to be used within a variety of unknown situations. For simple mathematical calculations or string manipulation it's not that difficult, but as your software grows in complexity the development of reusable objects increases in complexity as well. It's easier if you develop with a clear separation of responsibility. Multi-Layered MVCWe're all familiar with the MVC architecture basics. Well, at least us programmers are familiar with MVC. The idea with MVC (Model View Controller) is that you separate your data model, from your user interface, and both of those is separate from your code base. This is a good way to start, but MVC on its surface does not account for multi-tiered architecture. The Evolution of an IdeaThis entry could also appropriately be titled "How to Never Get Anything Done." It's a little bit funny how an abstract and undefined set of requirements can lengthen a project. Trimming down the requirements to a reasonable set is usually the best course of action, but in this case I'm actually pretty happy with the way things turned out. Recursive FunctionsRecursing functions is sometimes the only way to get things done, but it isn't always the obvious choice.Navy Mandated to Consider OSSThe U.S. Navy is now mandated to consider Open Source Software as an option for every acquisition they make. The VS Express dotNet sagaThe BBC as an article about Microsoft going after one of their MVPs that is getting linked from Slashdot, Reddit, Digg, and all the other usual venues. The basic storyline is that a developer extended VS Express with a Unit Testing mechanism and Microsoft is all up in arms about it. They harrassed him into un-releasing it, then eventually he decided to re-release it. Now they have threatened a law suit. Coming To a Decision on LicensingDeciding to open source an application is a big decision - basically it means giving away a body of work that required a great deal of effort. I've made the decision to do so on a project of mine because I feel that an open source release will provide the best path for the work to be utilized by the most people. Now that I've made that step, there is the decision of which open source license to use, or to develop my own license model. Javascript PointersAs I develop more and more with Javascript, I find the language very useful. One of the things that I'm not entirely too keen on is the lack of pointers. There are pointers for functions, but not variables, and when you are dealing with a large set of complex variables, memory usage becomes an issue, as is the problem of keeping variables in sync. I have a bit of a hacked solution to share.Simple Logging in PerlInevitably in the troubleshooting stage, I need to implement some sort of logging routine in my perl scripts. Here's the simplest way that I know to accomplish it. Finding Documentation where None ExistsAs I'm pushing my way through learning Lucene and Nutch, I'm finding that the documentation is comically sparse. This is a problem with many open source projects out there for various reasons, but the question arises - where do I find knowledge where none seemingly exists? Making Prototype Compatible with json.jsPrototype.js is not compatible with json.js. There are quite a few json.js files out there, but most of them would exhibit the same problem as they extend Object. The fix for this problem is quite simple. Reverse IP Lookup using PerlA quick and easy script for doing a reverse IP lookup using perl. It can serve as a standalone program, or it could easily be integrated in a larger project. A version of my reverse ip lookup tool is online Scriptaculous 1.7 CompressedScriptaculous 1.7 compressed and available for download - along with prototype 1.5. Faster download speeds means a better experience for your end users. RSS to an HTML ListA quick and easy piece of perl code for transforming an RSS Feed into a standard HTML list. Referential IntegrityA brief overview on what Referential Integrity is and why you need to address it with your software implementations. Prototype 1.5.0 CompressedPrototype powers a lot of sites on the web. The biggest complaint has to do with the size of the download. I've made available a fully functional and much smaller version using a series of compression and compacting techniques. InnerHTML in IE with the Pre TagHow-to for dealing with the <pre> tag innerHTML property in IE7. Revisiting Voting System DesignSome thoughts on a highly scalable design architecture for a web based voting system, similar to the ones used widely at various "web 2.0" social networking sites. Why Software Should be Open SourceOpen Source development scales better and is more reliable than closed source development. In fact, many open source projects outperform their closed source counterparts. Conversely, there are some problems with the open source model - it's far from perfect. Evaluating Open Source LicensesA brief introduction surrounding my evaluation of various open source licensing models. This is a complex subject - much more complex than it needs to be. Scriptaculous 1-7 beta 2 and Prototype 1-5 rc2 CompressedThe popular javascript library compacted significantly for faster download times - which results in a better user experience and reduced loads on your web server. Transformer Plugins in Movable Type 3.31Transformer Plugins are the modern version of BigPapi plugins. Documentation is sparse, but the end result is a way to modify the MT admin interface. It's a powerful way to update the publication infrastructure for specific needs. Re-Tooling for Web 3.0I fully intend to revamp the internet. This article was posted on the first day that I was inspired to do so. Voting SystemsInitial considerations and pontifications regarding a highly scalable anonymous internet based voting architecture. Now that is a lot of syllables. Fixed Width files to CSV using AnyDataAnyData is a powerful perl module for converting information from one format to another. This article specifically addresses migrating information from a fixed width file to Comma Separated Values (CSV). And on Another TrackA little bit of an off topic article describing my current set of programming tasks and my unnerving ability to overwhelm myself with a large and seemingly unrelated set of things to do. A Beast of a ProjectThe early stages of Baest development. What started out as a simple utility project has transformed itself into a much larger development effort. Counting Keys in a Perl HashSomething simple but evasive for those freshly introduced to perl programming. How to count the number of elements in a given hash structure.My first Movable Type PluginBuilding MT Plugins is not as complex a task as you might think. This article describes my initial experiences. Development PrioritizationWhere my priorities were at the time I wrote the article. Funny how little progress gets made when you spread yourself thin. Book ProcessingA few thoughts on building a utility that would integrate Amazon APIs into the MT interface. Something a little more robust than MTAmazon. Globbing vs. Directory HandlesWhich method is more efficient? What purposes to the two methods of extracting directory information serve? And what are the differences between the two. These answers and many more are... well, ok, I don't have any answers, but here are a few notes. Purpose Driven ProgrammingPurpose driven programming will consistently outperform Rapid Application Development methodologies, and more than likely always will. Layers of abstraction introduce unnecessary complexity into the equation. Documentation StandardsDeveloping my own set of documentation standards for the purpose of managing development efforts. To be or not to beBuilding free software vs. Shareware vs. boxed software. Which should I build and how will I realize the benefits? |
|
