Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do.
-- Steve Jobs

Sunday, September 25, 2011

Mock testing with Grails | Mastering Grails

Mastering Grails: Mock testing with Grails
In this Mastering Grails installment, Scott Davis shows you how to take advantage of the built-in mocking capabilities of the GrailsUnitTestCase and ControllerUnitTestCase classes included with Grails.

Thursday, September 22, 2011

Enhancing HTML tables using a JQuery DataTables plugin | CodeProject

Enhancing HTML tables using a JQuery DataTables plugin - CodeProject
In this article is shown how you can enhance plain HTML table with JQuery DataTables plugin

The Little Book on CoffeeScript | arcturo.github.com

The Little Book on CoffeeScript
CoffeeScript [1] is a little language that compiles down to JavaScript. The syntax is inspired by Ruby and Python, and implements many features from those two languages. This book is designed to help you learn CoffeeScript, understand best practices and start building awesome client side applications. The book is little, only five chapters, but that's rather apt as CoffeeScript is a little language too.
This book is completely open source, and was written by Alex MacCaw [2] (or @maccman [3]) with great contributions from David Griffiths [4], Satoshi Murakami [5], and Jeremy Ashkenas [6].

Demystifying UEFI, the Overdue BIOS Replacement - Slashdot

Demystifying UEFI, the Overdue BIOS Replacement - Slashdot
"After more than 30 years of unerring and yet surprising supremacy, BIOS is taking its final bows. Taking its place is UEFI, a specification that begun its life as the Intel Boot Initiative way back in 1998 when BIOS's antiquated limitations were hampering systems built with Intel's Itanium processors. UEFI, as the article explains, is a complete re-imagining of a computer boot environment, and as such it has almost no similarities to the PC BIOS that it replaces."

User Interface Programming in the (Near) Future | Bruce Eckel

User Interface Programming in the (Near) Future
In my article on JavaScript, I observed that we need a new language that generates good and safe JavaScript, so that you no longer have to think about either JavaScript issues or cross-browser problems. Little did I know that the solution(s) had already appeared in the form of JQuery and CoffeeScript.

Wednesday, September 21, 2011

How We Scrum | #AltDevBlogADay

How We Scrum « #AltDevBlogADay
We‘re a small indie company of six. Four programmer/designer hybrids, though each of them proficient in other areas too, one artist/designer and one community manager/marketing/designer. Only half of us have ever worked in other game companies and only one of us has ever contributed to a AAA game (though uncredited). We have no strong ego running the business, but a very collaborative atmosphere. That’s why we need a clear methodology for working efficiently. We have a rigid structure for our creative process in order to live the freedom that it gives. The system we’re using is loosely based on scrum but finely tuned to our situation. I don’t believe in off-the-shelf design methods. So we tailored our own. Here’s how we scrum.

How Microsoft Can Lock Linux Off Windows 8 PCs - Slashdot

How Microsoft Can Lock Linux Off Windows 8 PCs - Slashdot
Julie188 writes "Windows 8 PCs will use the next-generation booting specification known as Unified Extensible Firmware Interface (UEFI). In fact, Windows 8 logo devices will be required to use the secure boot portion of the new spec. Secure UEFI is intended to thwart rootkit infections by using PKI authentication before allowing executables or drivers to be loaded onto the device. Problem is, unless the device manufacturer gives a key to the device owner, it can also be used to keep the PC's owner from wiping out the current OS and installing another option, such as Linux."

Tuesday, September 20, 2011

End-to-End Test Driven Development in Grails – Part 1 | Cantina

End-to-End Test Driven Development in Grails – Part 1 « Cantina
Testing, and specifically test-driven development is a methodology which few developers fully embrace. Automated testing is inevitably viewed as something that can be done last minute once an application is completed, or it’s considered too time consuming to be done at all. What most people don’t realize though, is that over the lifetime of an application, and even during early development, testing saves countless hours. It allows developers to find errors early and reduces the amount of time spent debugging. It results in cleaner, simpler, and more understandable designs, and most importantly gives developers a much higher level of confidence in the final product.

Grails Scaffolding In-Depth | Jakob Külzer

Grails Scaffolding In-Depth « Jakob Külzer
Much of Grails power and ability to crank out applications can be accounted to its scaffolding mechanism for creating CRUD interfaces within no time. However, the default scaffolding templates provide only a simple boilerplate and fail to convince for more sophisticated forms. I spent quite some time in the previous weeks writing scaffolding templates. A lot of this process was trial and error, browsing source code and bothering Tomás Lin. I still have to find good documentation on this, so I'm posting my findings here in the hope to help people leveraging Grails even more. If you are just trying to understand how scaffolding works to building something more advanced, this is for you.

TFS is destroying your development capacity | Derek Hammer

TFS is destroying your development capacity | Derek Hammer
Team Foundation Server (TFS) from Microsoft is an application lifecycle management (ALM) solution that is deployed across many development teams and organizations. After working with TFS for 3+ years, I have come to the conclusion that organizations are better off without it and should look to adopting best of breed tools (of which, I claim, TFS is not part).
This post addresses three topics: the technical flaws of TFS and its subsystems, the culture TFS encourages and strategies on how to get out.

Four tips for learning how to program | (37signals)

Four tips for learning how to program - (37signals)
I recently received an email from someone who was getting into programming, and was asking for advice on how to proceed. He had a project in mind, and had started on it, but had run into areas where his current knowledge was insufficient to puzzle out the solution.
First of all, I was very impressed that he had actually started work. Ideas are a dime-a-dozen, and one of my least favorite things are “idea people” who feel like their work is done when they come up with an idea, and all that’s left is to find a programmer who is willing to fill in the blanks. That this person came to me after first trying to solve it himself was a huge mark in his favor.
Sadly, I wasn’t able to help him take his project further, but it gave me a chance to think back on the times that I’ve been a beginner (whether it was web programming, or iOS programming, or even something unrelated to software entirely), and to contemplate how I approached those beginnings.
I identified four things that I’ve found were fundamental to my particular learning style. Obviously, there are as many learning styles as their are learners, but these are what work for me.

Book Review: The Mythical Man-Month: Essays on Software Engineering, Anniversary Edition | Inspired by Actual Events

Inspired by Actual Events: Book Review: The Mythical Man-Month: Essays on Software Engineering, Anniversary Edition
Frederick P. Brooks, Jr.'s The Mythical Man-Month (MM-M) is one of the most famous books in all of software development literature and is arguably THE most famous book on software development management. There are already innumerable reviews of this classic, but I review it again in this post for those software developers who have not read it and want a small overview of what's to like about it. After all, it is PC World's #1 title in the list of Top Ten IT Books Never To Admit You Haven't Read. The full title of the edition I am reviewing in this post is The Mythical Man-Month: Essays on Software Engineering, Anniversary Edition.

The Benefits of Code Review | #AltDevBlogADay

The Benefits of Code Review « #AltDevBlogADay
I am a big fan of code reviews but they have a bad reputation. Worries about wasting time or getting bogged down in pointless and irrelevant discussions can cause the process to be dropped before it’s even started.
So why am I such a fan?

WinRT demystified - Miguel de Icaza

WinRT demystified - Miguel de Icaza
WinRT is a new set of APIs that have the following properties:
  • It implements the new Metro look.
  • Has a simple UI programming model for Windows developers (You do not need to learn Win32, what an HDC, WndProc or LPARAM is).
  • It exposes the WPF/Silverlight XAML UI model to developers.
  • The APIs are all designed to be asynchronous.
  • It is a sandboxed API, designed for creating self-contained, AppStore-ready applications. You wont get everything you want to create for example Backup Software or Hard Disk Partitioning software.
  • The API definitions is exposed in the ECMA 335 metadata format (the same one that .NET uses, you can find those as ".winmd" files).
WinRT wraps both the new UI system as well as old Win32 APIs and it happens that this implementation is based on top of COM.

Windows Build/Windows 8: My Impressions – Change is a good thing | John Petersen

Windows Build/Windows 8: My Impressions – Change is a good thing | John Petersen
If you have embraced XAML, there is something for you in Windows 8. If you have embraced js/css/html/jquery etc – there is something for you in Windows 8. The deal is this, if you are going to tie what you do to the specific implementation of a specific version of a closed source/vendor controlled product (which Windows is) – you are not allowed to bitch about it. There, I said it. It’s like the folks that complain about how a given piece of OSS works. Submit a patch if you don’t like it. If you don’t submit a patch, you don’t get to bitch. When you hitch your horse up to a particular post, you shouldn’t bitch because that vendor is looking to evolve its product. And quite frankly, there really isn’t anything to bitch about. Windows 8 looks pretty cool to me and it appears that MS is embracing more and more of what is open.

Don’t Cross the Beams: Avoiding Interference Between Horizontal and Vertical Refactorings | Three Rivers Institute

Three Rivers Institute » Blog Archive » Don’t Cross the Beams: Avoiding Interference Between Horizontal and Vertical Refactorings
Inexperienced responsive designers can get in a state where they try to move quickly on refactorings that are unlikely to work out, get burned, then move slowly and cautiously on refactorings that are sure to pay off. Sometimes they will make real progress, but go try a risky refactoring before reaching a stable-but-incomplete state. Thinking of refactorings as horizontal and vertical is a heuristic for turning this situation around–eliminating risk quickly and exploiting proven opportunities efficiently.

The Unfamiliar | Daring Fireball

Daring Fireball Linked List: The Unfamiliar
Objective-C is different than C++ or Java. Xcode is different than Visual Studio or Eclipse, and Xcode 4 is very different from previous versions of Xcode. Baxter-Reynolds certainly wouldn’t be alone in saying that he doesn’t like these differences. But it’s curious to argue Apple developer tools and frameworks are deficient due to a lack of time put into them. In numerous ways, both linguistically and tools-wise, Xcode, Objective-C, and Cocoa/Cocoa Touch are the evolutionary descendants of the NeXT developer platform from 1989.

iOS, Android, Windows Phone, Windows 8? A coder's guide | Technology | guardian.co.uk

iOS, Android, Windows Phone, Windows 8? A coder's guide | Technology | guardian.co.uk
It's patently obvious to anyone in the world of IT that app development can be used to create serious wealth. Microsoft's re-entry into the battle for dominance over the mobile computing space signaled by its Build conference in Anaheim, California, this week makes it far easier for talented developers to advance their careers and, perhaps, even make life-changing sums of money.

Google Preps Devs For One-Size-Fits-All Android - Slashdot

Google Preps Devs For One-Size-Fits-All Android - Slashdot
alphadogg writes "Google is preparing Android developers for the latest edition of its Android mobile operating platform that will work the same on both tablets and smartphones. Scott Main, the lead tech writer for Google's Android Developers Blog, reminded developers on Monday that the newest edition of Android — dubbed 'Ice Cream Sandwich' — will 'support big screens, small screens and everything in between.' Main also emphasized that Android would maintain 'the same version ... on all screen sizes' going forward."

Monday, September 19, 2011

Hudson - Environment Variables | Hudson Wiki

Building a software project - hudson - Hudson Wiki
When a Hudson job executes, it sets some environment variables that you may use in your shell script, batch command, Ant script or Maven POM 1. The following table contains a list of all of these environment variables.

Don’t rewrite Your Application | Java Code Geeks

Don’t rewrite Your Application - Java Code Geeks
When stuck with a legacy code base you’ll hear the claim “We’ll have to rewrite this from scratch in order to fix it!” It sounds promising. You start with a clean slate. You can do all the good stuff without all the mistakes. The only problem: It doesn’t work. Here is why.

RMS: 'Is Android Really Free Software?' | Slashdot

RMS: 'Is Android Really Free Software?' - Slashdot
An anonymous reader points out an article by Richard Stallman in The Guardian which questions whether Android should be described as 'free' or 'open.' Quoting:
"Google has complied with the requirements of the GNU General Public License for Linux, but the Apache license on the rest of Android does not require source release. Google has said it will never publish the source code of Android 3.0 (aside from Linux), even though executables have been released to the public. Android 3.1 source code is also being withheld. Thus, Android 3, apart from Linux, is non-free software, pure and simple. ... Android is a major step towards an ethical, user-controlled, free-software portable phone, but there is a long way to go. Hackers are working on Replicant, but it's a big job to support a new phone model, and there remains the problem of the firmware. Even though the Android phones of today are considerably less bad than Apple or Windows smartphones, they cannot be said to respect your freedom."

Effective Mockito Part 1 | EclipseSource Blog

Effective Mockito Part 1 « EclipseSource Blog
Last week I talked to a fellow developer, Frank Appel, about Mockito. We’ve been using this mocking library for over a year. We both agreed that of all the innovations we’ve tried in the last year or so, Mockito has boosted our coding productivity the most. With this blog series we want to share our experiences with Mockito. You see that I used the word “effective” in the title, and, in this context I want to define “effective” as arriving at clean test and production code as fast as possible.

Lion in VMware Fusion | Matt Legend Gemmell

Lion in VMware Fusion - Matt Legend Gemmell
The new version 4.0 of VMware Fusion for OS X was released today, and one of its major new features is that it supports virtualizing OS X Lion. Installing Lion in a VM is incredibly simple, as described below.

Sunday, September 18, 2011

How to deal with "java.lang.OutOfMemoryError: PermGen space" error | Stack Overflow

How to deal with "java.lang.OutOfMemoryError: PermGen space" error - Stack Overflow
Recently I ran into this error in my web application:
java.lang.OutOfMemoryError: PermGen space
It's a typical Hibernate/JPA + IceFaces/JSF application running on Tomcat 6 and JDK 1.6.
Apparently this can occur after redeploying an application a few times.

Using Hudson environment variables to identify your builds | Java.net

Using Hudson environment variables to identify your builds | Java.net
So your CI server now automatically deploys your application to an integration server. You've even configured it so that you can manually deploy to the QA server using the same process. Great! But wouldn't it be nice to know exactly what build you are looking at at any point in time? Well, Hudson lets you do just that.
When Hudson runs a build, it passes in a few useful environment variables, that you can use in your build script. This is a great way to inject information about the build into your deployable application. For example, Hudson build has a unique number, which you can reference in your build scripts using something like "${BUILD_NUMBER}". This is the list of variables (taken from an obscure corner of the Hudson documentation :-)

Saturday, September 17, 2011

Permanently remove files and folders from a git repository | Dalibor Nasevic

Dalibor Nasevic - Permanently remove files and folders from a git repository
Few weeks ago I froze gems on my blog project and ended up with a very big repository. So, I wanted to clean up the mess and remove permanently gems folder from the repository. "git rm" isn't doing the job well, it only removes the folder from the working tree and the repository still contains the objects of this folder. After a quick search, I found that git-filter-branch was the command I was looking for.

A Grails Plugin for Multiple DataSources | An Army of Solipsists

An Army of Solipsists » Blog Archive » A Grails Plugin for Multiple DataSources
There have been a few requests on the Grails user mailing list about using multiple data sources in a Grails app, i.e. some domain classes use one data source and database and others use another. Grails doesn’t directly support this – there’s only one DataSource and one SessionFactory, and all domain classes use them. But it turns out it’s not that difficult to support this (and it doesn’t involve too many ugly hacks …)

Tweaking The Grails Datasource To Cope With MySQL’s Foibles – Transentia

Tweaking The Grails Datasource To Cope With MySQL’s Foibles – Transentia
The application I am maintaining is falling prey to MySQL’s infamous “kill connections after 8 hours of inactivity” feature.
The users arrive each morning to find that their application is unworkable, ‘cos all the connections have “gone away.”
This IS a feature and not a bug, and it does make sense (the server has to manage its resources appropriately [for it] and 8 hours is as good a timeout as 1 or 1000)…but it is darned inconvenient, nonetheless.

Friday, September 16, 2011

Sitting and Standing | CUergo

CUergo: Sitting and Standing
The bottom line:
Sit to do computer work. Sit using a height-adjustable, downward titling keyboard tray for the best work posture, then every 20 minutes stand for 2 minutes AND MOVE. The absolute time isn’t critical but about every 20-30 minutes take a posture break and move for a couple of minutes. Simply standing is insufficient. Movement is important to get blood circulation through the muscles. Research shows that you don’t need to do vigorous exercise (e.g. jumping jacks) to get the benefits, just walking around is sufficient. So build in a pattern of creating greater movement variety in the workplace (e.g. walk to a printer, water fountain, stand for a meeting, take the stairs, walk around the floor, park a bit further away from the building each day).

Thursday, September 15, 2011

The Google+ API Is Released - Slashdot

The Google+ API Is Released - Slashdot
"Developers have been waiting since late June for Google to release their API to the public. Well, today is that day. Just a few minute ago Chris Chabot, from Google+ Developer Relations, announced that the Google+ API is now available to the public."

Metro | Daring Fireball

Daring Fireball: Metro
I don’t think there’s any hyperbole in Microsoft’s claim that this is “Windows Reimagined”. But it’s not so much that Windows 8 is Windows reimagined, but Metro that is Windows reimagined. It’s truly a whole new concept in how a computer interface should look and work.

Windows 8 Roundup - Slashdot

Windows 8 Roundup - Slashdot
There has been no shortage of Windows 8 news today.
"MrSeb writes: Earlier this morning, at the Build Windows conference in Anaheim, California, Microsoft made it patently clear that 'To the cloud!' is not merely a throwaway phrase: it is the entire future of the company. Every single one of Microsoft's services, platforms, and form factors will now begin its hasty, leave-no-prisoners-behind transition to the always-on, internet-connected cloud."

netbuzz pointed out that even the famous Blue Screen of Death will get a new look. "Lastly mikejuk writes: While everyone else is looking at the surface detail of Windows 8 there are some deep changes going on. Perhaps the biggest is that Metro now provides an alternative environment that doesn't use the age old Win32 API. This means no more overlapping windows — yes Metro really does take the windows out of Windows."

Tuesday, September 13, 2011

Grails - Checking Projects into SVN | grails.org

Grails - Checking Projects into SVN
Why a page dedicated to adding Grails projects to source control? Because you want to make sure that only realy source files rather than generated ones are added to the repository. There's nothing more annoying than being told by your SCM tool that such and such a file has been changed locally simply because it has been regenerated.
The key to successful use of source control with Grails is to make sure your SCM tool ignores the right files. Grails is pretty configurable, so this can depend on the project. But for a default Grails project you should ensure these files and directories are included in any ignore list:
  • target/
  • web-app/plugins/
  • web-app/WEB-INF/classes/ - common if you use Eclipse or STS

Writing Maintainable Code | simple-talk

Writing Maintainable Code
Writing maintainable code is hard. It must be understandable, testable and readable. Any one of these can be tricky, and together they seem pretty daunting. Thankfully, Michael Williamson makes it look easy to become a code craftsman.

Monday, September 12, 2011

Google Dart to “ultimately ... replace JavaScript” | 2ality

Google Dart to “ultimately ... replace JavaScript”
The following keynote will be held at the GOTO Aarhus 2011 Conference on Monday, Oct. 10, 2011:
Dart, a new programming language for structured web programming
This post explains what Dart is all about and how it relates to JavaScript.

Git: Your New Best Friend | SitePoint

Git: Your New Best Friend » SitePoint
This article introduces version control and Git without assuming you have any prior knowledge or programming experience. Because of its introductory nature, certain details are simplified or omitted and the use of the Git Graphical User Interface (Git GUI) is emphasized. Afterwards the reader should be able to use Git for basic version control and know where to locate further information.

Kevin Mitnick Answers - Slashdot

Kevin Mitnick Answers - Slashdot
Last week, you asked Kevin Mitnick questions about his past, his thoughts on ethics and disclosure, and his computer set-up. He's graciously responded; read on for his answers. (No dice on the computer set-up, though.) Thanks, Kevin.

Simple Continuous Integration / Deployment With Jenkins - Randall Degges

Simple Continuous Integration / Deployment With Jenkins - Randall Degges
Today I'm setting up a new Jenkins CI server for work, to move off our old Hudson server, so I figured this would be a good time to blog about the process, as it's so extremely helpful to us that I can't imagine ever programming without it again.

Sunday, September 11, 2011

Grails and Continuous Integration: An Essential Combo | Java.net

Grails and Continuous Integration: An Essential Combo | Java.net
Grails is a fantastic framework. As well as being ultra-productive and fun to work with, it encourages good testing practices, and provides a swathe of tools to make writing unit, integration, and web tests a real pleasure. As we will see, Grails also lends itself quite well to build automation. However, Grails is not Maven. Grails has a fairly loose concept of the software development lifecycle, and is happy to let you bundle up and deploy your application as a WAR file without running all the unit and integration tests first. A Continuous Integration (CI) server can help you keep the flexibility of the Grails development process, and still ensure that your code is fully tested for each and every code change. In this article, we will take a look at how you can introduce Continuous Integration into your Grails project. More specifically, we will walk through how you can automate your Grails testing and code quality metrics with Hudson, a popular open source CI tool.

How Do I Install PowerShell on Windows 7 and Other Questions - Hey, Scripting Guy! Blog - Site Home - TechNet Blogs

How Do I Install PowerShell on Windows 7 and Other Questions - Hey, Scripting Guy! Blog - Site Home - TechNet Blogs
Microsoft Scripting Guy Ed Wilson is here to help save the day. You do not have to download Windows PowerShell 2.0 if you have Windows 7 because it is already installed. Unfortunately, it is kind of hidden. To launch Windows PowerShell, you can use the Search Programs and Files dialog box. All that you have to do is type the word PowerShell and press Enter. The Windows PowerShell console will launch.

Learn.GitHub - Normal Workflow

Learn.GitHub - Normal Workflow
So you have a Git repository and everything is all setup. What now?
Generally, it is not going to be much different than working with any other source control system, the only real difference should be the staging process. The workflow will generally go something like this:
  • modify files
  • see what you’ve changed
  • stage the changes you want to commit
  • commit your staged changes
  • rinse, repeat
That is the most complex case - if you’re not collaborating with anyone and so have no upstream repository to push to, and you want to ignore the staging area, it can be as simple as:
  • modify files
  • commit your changes
  • repeat
Easy peasy. Remember, Git is decentralized, so you don’t actually need a public or shared server to commit to - you can use it like RCS if you want and just track local changes.

A Hudson/GitHub build process that works | ATOMIZED

⚛ A Hudson/GitHub build process that works
I’m a huge fan of Hudson, and have been since I discovered it. The biggest issue I’ve had with it is that the Git plugin just isn’t very good.
The situation has improved lately, with Andrew Bayer making significant improvements. With the features he’s added, reasonable and non-hacky workflows are no possible.
After some experimentation, this is what we’ve settled on at SimpleGeo...

Saturday, September 10, 2011

Git clone error on Jenkins/Hudson on Windows | Colin's Devlog

Git clone error on Jenkins/Hudson on Windows | Colin's Devlog
Recently I set up a new instance of Jenkins (formerly Hudson) running on my Windows 7 desktop computer. I tried to set up a job that would pull from a GitHub repository and do a build but (like every other time I've tried this) was foiled by the job simply hanging at the step where it tries to clone or fetch from GitHub.

Grails & Hudson Part 2: Back to basics | Lean Java Engineering

Grails & Hudson Part 2: Back to basics | Lean Java Engineering
Ok, so you’ve decided that you want to use Hudson to build your Grails projects (or have read part 1 and want to use CodeNarc too).
If you don’t know where to start, you’ve come to the right place.
The basic steps (and we’ll go into more detail on each one) are:
1. Download Hudson
2. Run Hudson
3. Download Hudson plugins
4. Configure Hudson
5. Create a Hudson job
6. Watch the trends

This post will get you started and subsequent posts in the series will add even more power to your CI process.

Friday, September 9, 2011

Git Is Simpler Than You Think | Nick Farina

Nick Farina - Git Is Simpler Than You Think
Git is not a Prius. Git is a Model T. Its plumbing and wiring sticks out all over the place. You have to be a mechanic to operate it successfully or you’ll be stuck on the side of the road when it breaks down. And it will break down.
By now we all know how to drive Git. We learned it by typing “git tutorial” into Google. We studied guides, how-tos, cheat sheets.
Did you know the top result for “git tutorial” is this manpage on kernel.org? I will give you a gold star if you can read the whole thing without falling asleep.
So instead let’s pull over, open the hood up, and poke around.

Wednesday, September 7, 2011

Programmers Need To Learn Statistics Or I Will Kill Them All | Zed A. Shaw

Zed A. Shaw - Programmers Need To Learn Statistics Or I Will Kill Them All
I have a major pet peeve that I need to confess. I go insane when I hear programmers talking about statistics like they know shit when it’s clearly obvious they do not. I’ve been studying it for years and years and still don’t think I know anything. This article is my call for all programmers to finally learn enough about statistics to at least know they don’t know shit. I have no idea why, but their confidence in their lacking knowledge is only surpassed by their lack of confidence in their personal appearance.


Testing Databases with JUnit and Hibernate Part 1: One to Rule them | Schauderhaft

Schauderhaft » Testing Databases with JUnit and Hibernate Part 1: One to Rule them
Databases are an extremely important part of almost every enterprise application. Yet there is very little support for testing your database, which results in very little tests coverage of database related code out in the wild. In a desperate attempt to change that at least a little the article series starting with this article will describe some of the problems and possible partial solutions based on Hibernate and JUnit.

Tuesday, September 6, 2011

Functional thinking: Coupling and composition, Part 1 | IBM developerWorks

Functional thinking: Coupling and composition, Part 1
Object-oriented programming makes code understandable by encapsulating moving parts. Functional programming makes code understandable by minimizing moving parts.
— Michael Feathers, author of Working with Legacy Code, via Twitter
Working in a particular abstraction every day causes it to seep gradually into your brain, influencing the way you solve problems. One of the goals of this series is to illustrate a functional way of looking at typical problems. For this and the next installment, I tackle code reuse via refactoring and the attendant abstraction impact.

Apple designer Jonathan Ive enters a new era - latimes.com

Apple designer Jonathan Ive enters a new era - latimes.com
Printed on the back of every iPod, iPhone and iPad is "Designed by Apple in California."

Those five words speak volumes about the pride Apple Inc. takes in design — and in design chief Jonathan Ive.

Steve Jobs may have dreamed up the ideas. But Ive turned them into products with a cult following.

The synergy between Apple's co-founder and its top designer set into motion a decade of hits from the iPod to the iPad.

Now Apple will be counting on Ive to continue to deliver breakthrough designs without much oversight or support from Jobs, who last month stepped down as chief executive.

Mocks Aren't Stubs | Martin Fowler

Mocks Aren't Stubs
The term 'Mock Objects' has become a popular one to describe special case objects that mimic real objects for testing. Most language environments now have frameworks that make it easy to create mock objects. What's often not realized, however, is that mock objects are but one form of special case test object, one that enables a different style of testing. In this article I'll explain how mock objects work, how they encourage testing based on behavior verification, and how the community around them uses them to develop a different style of testing.

Making a Mockery of TDD | Virtuous Code

Making a Mockery of TDD | Virtuous Code
I made this gnomic remark on Twitter the other day:
To be a successful mockist, you must dislike mocks.
A lot of people re-tweeted it, so I guess I’m not completely alone in thinking this way.
I should back up a bit. A “mock object”, or “mock”, is a specific kind of test double. It is an object used in a Unit Test which stands in for another object, and carries certain expectations about how what methods will be called, and how they will be called. If the expectations are not met, the test fails. By contrast, other test doubles, such as stubs objects, make no assertions about which methods will be called. This article is specifically about mock objects and mocked methods, which make an assertion about when, how many times, and with what arguments certain collaborator methods will be called.
The term “Mockist” refers to those programmers who use mock objects in their unit tests. There is another camp of programmers, called “Classicist” by Martin Fowler, who eschew mock objects entirely in their tests.

What I Learned | Rails Test Prescriptions Blog

What I Learned « Rails Test Prescriptions Blog
Here are a dozen or so oversimplified, fortune cookie-esque things that I think I learned in the last four years. Some of these are probably blog posts in their own right, which I may get to one of these days.

Monday, September 5, 2011

Linux Kernel Moves To Github - Slashdot

Linux Kernel Moves To Github - Slashdot
An anonymous reader writes "Linus Torvalds has announced that he will be distributing the Linux kernel via Github until kernel.org servers are fully operational following the recent server compromise. From the announcement: 'But hey, the whole point (well, *one* of the points) of distributed development is that no single place is really any different from any other, so since I did a github account for my divelog thing, why not see how well it holds up to me just putting my whole kernel repo there too?'"

Self-educate to survive | Opinion | .net magazine

Self-educate to survive | Opinion | .net magazine
If you lack a formal design education, you’ll need to self-educate before you can progress in your career, says Ryan Downie. Here's a checklist of the subjects he studied to help him to understand more about web design.

Nook Color: Updated Clockwork Recovery Bootable SD | Maurice Mongeon

Nook Color: Updated Clockwork Recovery Bootable SD | Maurice Mongeon
This is an updated compilation of the latest bootable CWR SD images. These new images are unique in which they work for all ROMS including honeycomb, froyo, stock, and gingerbread. Just write one of these to the SD card and copy over your ROM.zip files to flash. A special thanks goes out to cmstlist @ XDA Developers for creating the bootables and referencing my page here.

Barnes & Noble Nook Color: Full Update Guide - CyanogenMod Wiki

Barnes & Noble Nook Color: Full Update Guide - CyanogenMod Wiki
This guide will walk you through the process of taking the Barnes & Noble Nook Color from stock to having a custom recovery image and the ability to flash the latest version of CyanogenMod.

Scripting with Windows PowerShell

Scripting with Windows PowerShell
Learn the basics of Windows PowerShell from Microsoft Scripting Guy Ed Wilson. In this five-part webcast series, Ed demonstrates starting and stopping processes and services, working with event logs, writing your first Windows PowerShell script, working with files, and more.

Getting Started with Git and GitHub on Windows | Kyle Cordes

Getting Started with Git and GitHub on Windows - Kyle Cordes
I’ve been attracted to, and trying out, various distributed source control tools for the last two years, and have come to the conclusion that the most likely “winner” is Git. Git does a great many things right, good progress is being made in the few areas it is weak, and it has rapidly growing popularity. There are many web sites with extensive information about using Git, learning Git, Git integration, and more.

SmartGit - Finally a Window git client that doesn't suck | Adam Kennedy at blogs.perl.org

Adam Kennedy at blogs.perl.org: SmartGit - Finally a Window git client that doesn't suck
For years I've struggled with the git'erati and their zealotous ways.
First it was "It's awesome, just use Linux".
Then it was "It's fine, just use cygwin" ignoring the fact it clashes with Strawberry.
Later, this because "It's fine, just use msysgit" when most people on Windows don't like command lines and don't want to use them.
Finally, it's been "Stop trying to think about git like svn, it is a special flower!"
It's always felt like the same wrong argument. That git was so fast and magical and OMG that it didn't matter that it didn't work like people on 80-90% of the world's computers would expect it to, or that it used a whole parallel set of terms, or that it had guis that were both ugly and utterly unusable unless you already knew the command line versions.
No, clearly it was our (my) fault for just not being awesome enough for git.
So it is with great joy that I can report, as the unofficial poster boy of Perl's Windows Git Curmudgeons, that there finally exists a Windows git client that works normally.
http://www.syntevo.com/smartgit/index.html

SmartGit review: don’t use it. | T=Machine

T=Machine » SmartGit review: don’t use it.
Just don’t use it, whatever you do.
It’s hopelessly buggy, it is the worst possible git client you could use.
And … for the third time, it just corrupted a git repository. This time I know it wasn’t user-error, it was just SmartGit.
Totally unforgivable.

SmartGit - The Best Git Gui So Far | Engineered Web

SmartGit - The Best Git Gui So Far | Engineered Web
As Git becomes more popular and widely used a GUI becomes even more important. This was especially important when Drupal recently looked at what version control system it was going to switch to. (If you're interested in the Drupal (unofficial) decision checkout Angie Byrons post on groups.drupal.org)
When I surveyed the Git GUI landscape SmartGit stood above the rest for your standard user.

Remote repositories using EGit, HgEclipse | ekkes-corner

DVCS part 4: remote repositories using EGit, HgEclipse « ekkes-corner: eclipse | osgi | mdsd | erp | mobile
This blog is part of a DVCS – blogseries: part 1 – install Git and Mercurial together with EGit and HgEclipse, part 2 – initializing of and importing from local repositories, part 3 – team options and committing/pushing to local repositories.
This time we want to work with remote repositories using EGit and HgEclipse. Lars Vogel has already published an article about “Egit and GitHub“, but I don’t want to push a single Eclipse project – I want to push a Repository with more then one project.
This post will describe how to push a bunch of projects to existing Servers like GitHub, Bitbucket or SourceForge, where your Open Source Projects can be hosted. How to create your own Remote Server isn’t subject of this blog.

Sunday, September 4, 2011

Git/Github survival guide | Ivan Porto Carrero

Git/Github survival guide | Ivan Porto Carrero
The first tip I can give you and most of what I’ll be talking about is in the guides from github. When you’re used to Subversion or Team Foundation Server for example you’ll need to make a mental leap. That leap would be to realise that your local copy is the master copy for you. The remote server like github.com is one is a little bit like an afterthought. I think it goes a little bit like this: “O cool I’ve built this really cool thing here and I’ve got it in this git repository on my machine. It would be cool if other people also had access. Wait a minute, I’ll just add a remote and push my stuff onto that server.” Problem solved.

Mobile Views with Grails | Graham's Blog

Mobile Views with Grails | Graham's Blog
With mobile browsers exploding in popularity, it is now vital for almost any website to accommodate them. If your website isn’t as usable on an iPhone as it is on a desktop, then you may be turning away a large percentage of potential customers.
Tools such as jQuery Mobile and iWebKit have made it easy enough to produce a site that looks great on any of the popular handsets, such as the iPhone, iPod Touch, Blackberry or Android based models. But most sites need to serve both mobile and regular desktop users. So the questions are:
  • How to detect mobile users?
  • How to ensure that mobile and non-mobile users each see content that is formatted clearly for their screen size?
  • How to do all this without creating a separate site for each type of user?
  • How to do all do all this using Grails’ DRY concepts?
If you’re developing your site with Grails, you’re in luck. Using the method I will describe below, you can easily create one site that looks great on both mobile and non-mobile browsers.

Friday, September 2, 2011

Yes, Virginia, Scala is hard | Good Stuff

Yes, Virginia, Scala is hard - Good Stuff
Let me first say that I am a Scala lover and have been a Scala champion for almost 5 years. I've written books and articles on Scala. I've worked with dozens of companies that have launched Scala and Lift projects. I've code reviewed many dozens of Scala projects.
I used to think that Scala was easy. It was, and continues to be, a cure for some of the numerous problems with Java. From the "stuff that's hard or impossible in Java is simple in Scala," Scala is a very easy language. Dealing with collections is super easy in Scala. Isolating business logic making programs much more maintainable is vastly easier in Scala than it is in Java.
So, why is Scala hard? Here's the best list I can come up with...
Beginning Scala (Expert's Voice in Open Source) Programming in Scala: A Comprehensive Step-by-step Guide Programming Scala: Scalability = Functional Programming + Objects (Animal Guide)

RubyTapas: Short screencasts of gourmet Ruby code, served up daily

RubyTapas: Short screencasts of gourmet Ruby code, served up daily
Here's the pitch: you're a Ruby on Rails developer. You can code up a blog in 15 minutes, and an ecommerce site in half a week. You eat routes files for breakfast and when you sleep you dream in HAML.
You're ready for more. You know Rails is built on a language of extroardinary expressive power and elegance. Maybe you've watched master Rubyists craft exquisitly concise methods that would make Java programmers weep with envy. Or maybe you've been reading about SOLID principles, but you're not sure how to apply them to your Ruby programs. You'd like to level up your knowledge of the core Ruby language, but you also have milestones to hit. You don't have the time to read thick books or go to week-long training sessions.
RubyTapas is for the busy Ruby or Rails developer who is ready to reach the next level of code mastery. Daily short screencasts will introduce you to a wide variety of intermediate to advanced Ruby concepts and techniques, as well as core Object-Oriented design principles. Lead by head chef Avdi Grimm (author of Exceptional Ruby), you'll go from journeyman to master, one small, tasty plate at a time.
The Ruby Programming Language Metaprogramming Ruby: Program Like the Ruby Pros Eloquent Ruby (Addison-Wesley Professional Ruby Series)

Right - Steve Jobs' vision on the role of computers in our lives | All this

Right - All this
The unique thing about Steve Jobs isn’t his attention to detail, isn’t his incredible focus, isn’t his good taste in product design. These have all been a part of his success, of course, but lots of people are focused and detail-oriented. Relatively few, especially in the tech business, combine that with good taste, but they’re around. What makes Steve Jobs unique is that he’s been consistently right in his vision of the role of computers in our lives.
Steve Jobs Return to the Little Kingdom: Steve Jobs and the Creation of Apple The Second Coming of Steve Jobs

Making It More Functional | KodefuGuru

Making It More Functional
Ted Neward goes through a code kata with several programming paradigms in the latest Working Programmer column. Being a coding polyglot is all the rage nowadays, and understanding multiple paradigms is essential to being a well-rounded developer. Ted goes through procedural style, modifies it to be object-oriented, demonstrates how to use meta and then dynamic programming. Finally, he makes it more functional. The proposed solution adds an aspect of functional programming, but it can be taken further.
Real World Functional Programming: With Examples in F# and C# Functional Programming in C#: Classic Programming Techniques for Modern Projects (Wrox Programmer to Programmer) Functional Programming for Java Developers: Tools for Better Concurrency, Abstraction, and Agility

Multiparadigmatic .NET, Part 10: Choosing an Approach | The Working Programmer

The Working Programmer - Multiparadigmatic .NET, Part 10: Choosing an Approach
In my last column (Part 9 of this series), I suggested that any time an article series gets close to double digits, the author is either pretentious enough to think his readers are actually interested in that subject that many times in a row, or he’s just too boneheaded to come up with a new topic. Readers are left to speculate as to which of those two cases are at work here.
Nevertheless, commentary from the field has made it clear that despite the dangers of traversing into double-digit territory, one more article on multiparadigmatic design seems necessary to try to tie all the individual elements together—to demonstrate how to use each of these different paradigms and choose among them for a real-world problem. “Real-world,” for our purposes, means non-trivial enough to hint at how the approach might be useful for problems that aren’t as simple as those chosen to solve in a magazine article.
Trying to create such a problem turns out to be more difficult than it might appear; either the idea is too complicated, with too many distractions in it to get a clear view of the solutions used; or the idea is too simple, allowing for too little variation in its implementation to illustrate how the different paradigms might each be used to solve it. Fortunately, to get started we can make use of some work that has already been done—in the form of Dave Thomas’ “Code Katas.”
Introducing .NET 4.0: With Visual Studio 2010 (Expert's Voice in .NET) Head First C#, 2E: A Learner's Guide to Real-World Programming with Visual C# and .NET (Head First Guides) Pro C# 2010 and the .NET 4 Platform

Age Bias In IT: the Reality Behind the Rumors - Slashdot

Age Bias In IT: the Reality Behind the Rumors - Slashdot
CWmike writes "Is high tech really that tough on older workers, or are they simply not pulling their weight in an industry that never stops innovating? Age bias: Some consider it IT's dirty little secret, or even IT's big open secret. Older workers have been hit harder by the recession. '[Age bias is] something that no [employer] talks about. But it's a reality in tech that if you're 45 years of age and still writing C code or Cobol code and making $150,000 a year, the likelihood is that you won't be employed very long,' says Vivek Wadhwa, who currently holds academic positions at several universities, including UC Berkeley, Duke and Harvard. Wadhwa's observation indicates that age bias is a simplistic label for a complicated set of factors that influence the job prospects for senior tech employees."
 The Passionate Programmer: Creating a Remarkable Career in Software Development (Pragmatic Life) The Career Programmer: Guerilla Tactics for an Imperfect World (Expert's Voice) Land the Tech Job You Love (Pragmatic Life)

Thursday, September 1, 2011

Truck Factor | Agile Advice

Truck Factor (Agile Advice)
Truck Factor (definition): "The number of people on your team who have to be hit with a truck before the project is in serious trouble"
Clearly "hit by a truck" is an extreme thought however you could easily substitute "take vacation at the same time" to get the same idea. If any part of your project has a truck factor of one then you are in a particularly fragile situation. If that one person leaves or is unable to work on the project, you will suffer the consequences.
Over time, anyone can be replaced. Truck factor is an indication of how expensive it will be to replace specific people.
Succeeding with Agile: Software Development Using Scrum Agile Project Management with Scrum (Microsoft Professional) The Agile Samurai: How Agile Masters Deliver Great Software (Pragmatic Programmers)

Why Developers Never Use State Machines | SKORKS

Why Developers Never Use State Machines
A few months ago I saw a great little blog post about state machines on the Shopify blog. The message was that state machines are great and developers should use them more – given my recent experiences with state machines at CrowdHired, I could certainly agree with that. But it got me thinking, how many times in my developer career have I actually used a state machine (either separate library or even hand-rolled abstraction)? The answer is zero times – which surprised the hell out of me since state machines really are very useful. So I decided to engage in a bit of introspection and figure out why we tend to manage our "state" and "status" fields in an ad-hoc fashion rather than doing what is clearly called for.

Life After Pair Programming | Jay Fields' Thoughts

Jay Fields' Thoughts: Life After Pair Programming
When I first joined DRW I noticed that the vast majority of developers were not pair-programming. I was surprised that a company that employed so many smart people would just simply disregard a practice that I considered to be so obviously beneficial.
note: it's so easy to judge people who don't pair-program, isn't it? You can write-off their behavior for so many reasons:
  • They simply haven't done it enough to see how much value it provides.
  • They've used the wrong setup, and turned a positive ROI into a negative ROI situation in the past.
  • They must be anti-social or not team players.
  • They must guard their code because they are too proud or believe it's job security.
Never once did I consider that their behavior might be correct based on their context. There was no context in which pair-programming wasn't the right choice, right?
Almost 3 years later, and on a different team, I basically never pair.
Extreme Programming Explained: Embrace Change (2nd Edition) Planning Extreme Programming Extreme Programming Installed

Do I Need to Know How to Code? — Shawn Blanc

Do I Need to Know How to Code? — Shawn Blanc
Sure, some people have absolutely no desire to do design work or to learn to code because it’s simply not in the cards them. But for those of you who do think you could learn to code, I think the most important pre-requisite is curiosity.
Actually, that pretty much goes for any venture in life. You can do whatever you set your mind to.
Designing with Web Standards (3rd Edition) Basics of Web Design: HTML5 and CSS3 Developing with Web Standards