Abstractivate: Why Functional Matters: Your white board will never be the same Why learn functional programming? For better design skills! The other day we designed a process to match cleared deposits with dispensations. This is how I would have white-boarded it a few years ago: Since then I've played around with functional programming. Thinking about the problem in this way leads to this kind of diagram: Thinking about the program as a data pipeline keeps me thinking about what needs to happen, instead of how each step should be done. Whatever language we use to write the solution, thinking about it this way has the following advantages: * It breaks down into pieces. In this way, thinking functionally helps with agile (task breakdown), TDD, and maintainability. For how functional thinking helps at a lower level too, check this post. New coding tricks are fun, but new white board techniques are serious business.
How to create patch file using patch and diff November 23rd, 2006 mysurface Posted in Developer, diff, Misc, patch | Hits: 323569 | 14 Comments » Okay, this is what I do. I only know the basic. But before doing this, please backup your source code, patch wrongly will screwup your source code. First, how to create patch file? Assume Original source code at folder Tb01, and latest source code at folder Tb02. diff -crB Tb01 Tb02 > Tb02.patch -c context, -r recursive (multiple levels dir), -B is to ignore Blank Lines. How to patch? Doing dry-run like this: patch --dry-run -p1 -i Tb02.patch The success output looks like this: patching file TbApi.cpp patching file TbApi.h patching file TbCard.cpp ... The failure ouptut looks like this: patching file TbCard.cpp Hunk #2 FAILED at 585. 1 out of 2 hunks FAILED -- saving rejects to file TbCard.cpp.rej patching file TbCard.h Hunk #1 FAILED at 57. At last, if the dry-run is giving good result, do this and enjoy the compilation. patch -p1 -i Tb02.patch References: 1.
OmniFocus: My Approach I teach Computing to children and in education there are many Computing terms that we rarely use outside the classroom. For example, we say IT in the real world but ICT (Information and Communications Technology) in school. One term that I think is useful but little used outside of the classroom is General Purpose Package. A GPP is any application which is of little use or interest until you input your own information, such as Pages or Numbers. The classic counterexample is a game, to which you provide very little data and are generally strongly constrained in your usage patterns. I think there's an intimidating middle ground, though, between a truly general purpose application like Keynote or Excel and a purely specific purpose app like Photobooth, Google Earth or Skype. Some of the applications I mentioned are easier to approach than others, due to the greater amount of direction (or reduced flexibility) they give to the user's actions. Get Focused And so to OmniFocus. My Approach
Git from the bottom up In my pursuit to understand Git, it’s been helpful for me to understand it from the bottom up — rather than look at it only in terms of its high-level commands. And since Git is so beautifully simple when viewed this way, I thought others might be interested to read what I’ve found, and perhaps avoid the pain I went through finding it. The following article offers what I’ve learned on this journey so far. I hope it can help others to comprehend this wonderful system, and discover some of the joy I’ve experienced in the past few weeks. NOTE: After receiving more than fifty corrections by e-mail from very helpful readers, I’ve updated the PDF to reflect their input. The date at the front should read “December 2009″ if you have the latest version. Here is a summary from the table of contents:
The Weekly Review as an OmniFocus Project I've recently been getting my GTD system back together in the aftermath of the Viewfinder release. Most systems get out of whack in the run-up to software releases, but you always have to get back in the saddle. As I was reorganising my OmniFocus, I started to think that it would be great if OmniFocus could help you through the weekly review. I took the standard list of weekly review steps from the Getting Things Done book and added them into a project: The insight here is in the repeat settings. Set the project to "Mark complete when completing last item"Set the project to "Start again 1 week after completion" These settings mean that, whenever I complete a Weekly Review project, another project will immediately appear with a due date one week hence. Download Here's an OmniOutliner file template that you can import into your OmniFocus database with the actions and notes. Download: Review.oo3
TracStandalone Note: this page documents the version 1.0 of Trac, see 0.12/TracStandalone if you need the previous version Tracd is a lightweight standalone Trac web server. It can be used in a variety of situations, from a test or development server to a multiprocess setup behind another web server used as a load balancer. Pros ¶ Fewer dependencies: You don't need to install apache or any other web-server. Cons ¶ Fewer features: Tracd implements a very simple web-server and is not as configurable or as scalable as Apache httpd. Usage examples ¶ A single project on port 8080. $ tracd -p 8080 /path/to/project Strictly speaking this will make your Trac accessible to everybody from your network rather than localhost only. $ tracd --hostname=localhost -p 8080 /path/to/project With more than one project. $ tracd -p 8080 /path/to/project1 /path/to/project2 You can't have the last portion of the path identical between the projects since Trac uses that name to keep the URLs of the different projects unique. where:
Vast Web of Dark Matter Mapped — By analyzing the light from 10 million galaxies, astronomers have built the largest dark matter map ever created. — The map visualizes an intricate cosmic web of dark matter and galaxies one billion light-years across. — Understanding the structure of dark matter will help us understand the evolution of the Universe. Astronomers have created a vast cosmic map revealing an intricate web of dark matter and galaxies spanning a distance of one billion light-years. This unprecedented task was achieved not by observing dark matter directly, but by observing its gravitational effects on ancient light traveling from galaxies that existed when the Universe was half the age it is now. Constructed by astronomers from the University of British Columbia and the University of Edinburgh, this is the largest dark matter map ever built and took five years to complete. The research was presented at the American Astronomical Society meeting in Austin, Texas, on Monday. SCIENCE CHANNEL VIDEO: Dark Energy
How to Transfer and Move Hotmail to Gmail – My Digital Life Windows Live Hotmail (previously known as MSN Hotmail or simply Hotmail) has upgraded its user interface to new Outllook lookalike AJAX-intensive interface, and has successfully annoyed many existing users of Hotmail. Gmail turns out to be a good alternative if you decided to dump Hotmail and switch to other webmail service provider. Or for any reason, such as love the features and loading speed of Gmail, you want to transfer and move all your Hotmail email messages to Gmail, there is a very simple way to do it. The trick to transfer and move mails in Hotmail to Gmail or vice versa from Gmail to Hotmail is by using IMAP support of Gmail and HTTP server support of Hotmail and MSN. The moving of mails from Hotmail to Gmail relies on special email client from Microsoft is actually the same with process to upload and import existing mails into Gmail, with additional process to configure Hotmail account. Expand the folder tree to reveal Inbox mailboxes for both accounts. Notes:
Working with Assertions to Debug your Apps | Mobile Developer Tips Assertions provide a mechanism to catch errors by checking a condition statement(s) and throwing an exception if the condition check fails. Assertions are implemented as macros that you can use to evaluate conditions at various points in your application. Often times assertions are used as a sanity check to verify variables contain the values, or range of values expected. As an example, I’ve used assertions during early development phases when working with web services – as I was writing the iPhone app another team was developing web-services and programming interfaces to the same. Using Assertions in Objective-C Methods Two categories of assertions are available when writing iOS apps, assertions for use within Objective-C methods, and assertions that are used inside a C-based function. NSAssert and its kin – NSAssert1, NSAssert2, etc – are used inside methods. #define NSAssert(condition, desc) Looking a little further, in NSException.h we can see the full definition: Disabling Assertions