Last week, Microsoft’s Patterns & Practices team released Patch 2554 for the Enterprise Library 2.0. The main point of this patch is to allow one to use the library in partial trust mode—which is a common scenario with web applications in these dangerous days.
I have been using the libraries quite a while, so I thought I would share some tips and tricks about using the code that I found were not particularly well documented nor advertised.
Trick #1: Get the Libs, Man
Submitted by Gavin Bowman on Mon, 2006-07-10 06:23.
Do you feel yourself slowing down as you get older? Feel like your brain’s getting a bit sluggish? Nintendo might have the answer: Dr Kawashima's Brain Training (Brain Age in the US).
You’ve probably already read about this, and about how popular it’s been with Japanese pensioners, in a mainstream newspaper or on another website (got to love that marketing exposure). In case you haven’t, it’s a collection of short brain exercises for the Nintendo DS. It makes you perform simple little tests like memorization, reading aloud, or basic calculations, on a regular basis, keeping graphs to track your performance over time. To make sure there’s no cheating, you can only record a score in each training program once a day.
Submitted by Nola Stowe on Wed, 2006-06-21 10:09.
I love testing, I could hardly wait for this meeting of the Chicago Ruby Group. I was not disappointed. Unit tests are cool, but specs are awesome. Whats the difference you say? I think its a more natural way to write your tests, it makes you think of the behaviour of your object and not "oh gosh, I have to write 3 tests for each of my methods."
Marco Sanvido asks: "I often look at source code (especially C, but this question is valid for other languages as well) and I have a really hard time in understanding how it works. Documentation is often missing or quite outdated, and the only way to see how the program works is to try to understand the source code. Which tools do you prefer to use for browsing and studying source code? So far I have used LXR for Linux, Eclipse for java, and CScope, but I'm not sure that these tools are the best solution." It's tempting to flood this question with answers for your IDE, but the key thing here is _browsing_, not _development_. What decent, lightweight programs would work well as source code viewers?
Boudewijn Rempt writes "Amazon's recommendation system recommended me "Open Source Game Development: Qt Games for KDE, PDA's and Windows" when I was looking for an introduction to OpenGL. While it does contain two chapters on OpenGL, there's much, much more. It's not just an introduction to writing open source games, it's a complete introduction to participating in open source projects like KDE." Read the rest of Boudewijn's review.
Portions of this entry were first published in the SitePoint Tech Times #139.
Have you written your own AJAX framework yet? It seems all the big boys are doing it. Microsoft is bringing us Atlas for ASP.NET, Yahoo!’s User Interface Library is open source, server agnostic and beautifully documented and Adobe is working on Spry, which is off to a shaky start in the web standards department. Do we really need another?
Submitted by Nola Stowe on Tue, 2006-04-04 13:20.
Comment a block of code
VIM does orgami
Comment a block of code
I learned this from my friend Brian... say you have 5 lines of code you want to comment out, perhaps you are doing caveman debugging to find where the real problem is..
ctrl-v to go into visual block mode j down to select the first column in each line I to insert at begining of line enter your comment symbol esc
And there you go! Thanks Brian :)
VIM does orgami
Almost, although you can't make a paper crane with VIM, you can fold your code to make long chunks of code easier to live with. This is something I use in UltraEdit, when I have a really looooooong function that I am not curently working with and I have to scroll up and down to see the code around it.
Submitted by Nola Stowe on Tue, 2006-03-21 13:00.
With my recent Ruby on Rails project, I've done more on the linux command line than with PHP development. For example, you run a ruby script to generate a code skeleton for scaffolding, controllers, models and views. Stuck with a windows environment for my development on the go (I commute 3 hours a day, in which time I'm hacking away on my laptop, which I am doing right now. In Vim.)
I reached into the crevices of my mind to remember how to create Batch files. Yes, that’s right, batch files. Yes, Good Old MS-DOS. I still have a DOS For Dummies book (aquired long after DOS was out, I just couldn't resist the nostalgia and I think it only cost 2 bucks). I created a batch file for ls, mv and cp. Not rocket science I know and although I had installed cygwin I was not particularly keen on using that all the time, I also had found some exe's that imitate many of the unix commands...but I didn't need all that jazz. I just wanted a ls, mv and cp command!
As my project progressed, I was doing more and more on the server side, tweaking here and there. Man, I said… I need to get VI for windows I knew it existed, I had it many years ago. Actually, I think it was only a dos version that I had. I searched and discovered GVIM. And it’s pretty darn nice!
Submitted by Keith Casey on Wed, 2005-12-07 09:05.
This is the second in a series of interviews we're making available to the CodeSnipers community. We have been working to track down people who we thought had something valuable to say about the software development community, tools, practices, or direction. Some of the names you will recognize immediately, others you've probably never heard of, but all of them have made an impact in one way or another. Without further delay... we have Mike Ho the lead developer of Qcodo.
Qcodo had its debut at the Zend/PHP Conference in October and few in our community were there. Can you tell us about how Qcodo came about and what it does?
Well at the risk of sounding like “yet another PHP framework”, Qcodo is in fact a PHP development framework.
It is focused on allowing development teams create good, solid prototypes in a ridiculously short amount of time, and for giving developers a toolset to mature these prototypes into full-fledge enterprise-level applications.
At its core, Qcodo is broken down into two main parts: the Code Generator and Qforms. The Code Generator focuses on analyzing your database to create basic Create, Restore, Update and Delete (CRUD) functionality. Qforms is an object-oriented stateful, event-driven architecture to handle web page and HTML forms processing, similar to .NET or Java Struts. Both obviously work with each other seamlessly. But you could definitely choose to just use one or just the other.
The entire framework originally started out over 4 years ago as just a simple but robust Microsoft SQL Server and ASP code generator while I was working as an independent contractor. Since then, it has been rearchitected and greatly improved upon throughout the years, first being ported to ASP.NET. Over a year ago it was redesigned specifically for PHP 5 and has been made into a full-fledged development framework for use with the many projects I have been fortunate enough to work on. Throughout Qcodo’s life it has been used on a wide variety of projects on all these platforms, from small startups to Fortune 500 companies like Covad and Lockheed Martin and large government agencies like Chicago Public Schools and NASA.
Earlier this year, I was fortunate enough to be invited to speak at the MySQL User’s Conference, where I talked about the code generator, specifically, and how code generation techniques could be used to greatly accelerate enterprise application development. The feedback was so overwhelming, not only for the technique, but for the code generator itself, that I realized that the market has a huge need for not just the code generator, but an entire framework like Qcodo to be open sourced. So I spent the next couple of months cleaning up the code and ensuring that it was clear of any proprietary or IP constraints, and released it as an open source framework in time for the Zend/PHP Conference.
Submitted by Paul Dix on Fri, 2005-11-11 09:45.
Originally I planned for this post to be a sort of how to for creating floating content panes in a Rails application. If you’re unsure what I’m talking about have a look at protopage or Winlike for decent examples. I didn’t want to write everything from scratch so I began a search for reusable code in the form of a widget that I could use that would make sense for the example. What I found was that there’s a lot out there and there are different approaches to web based widgets. What follows are a few of the things I found and an open question on what the best approach may be.