background preloader

GitHub Flow – Scott Chacon

GitHub Flow – Scott Chacon
August 31, 2011 Issues with git-flow I travel all over the place teaching Git to people and nearly every class and workshop I’ve done recently has asked me what I think about git-flow. I always answer that I think that it’s great - it has taken a system (Git) that has a million possible workflows and documented a well tested, flexible workflow that works for lots of developers in a fairly straightforward manner. It has become something of a standard so that developers can move between projects or companies and be familiar with this standardized workflow. However, it does have its issues. One of the bigger issues for me is that it’s more complicated than I think most developers and development teams actually require. Both of these issues can be solved easily just by having a much more simplified process. Its simplicity gives it a number of advantages. GitHub Flow So, why don’t we use git-flow at GitHub? There are a number of advantages to deploying so regularly. How We Do It Conclusion

I Want To Teach My Kid How to Program Computer programming is a practical skill that can be applied to many professions and hobbies besides software development. However, it can be intimidating to break into. This guide will help parents point their kids in the right direction to get started in programming. The Gist Kids as young as 9 (or even younger) can learn programming, it doesn’t require math skills beyond basic arithmetic.Making video games is the best way to learn programming and stay interested.Python is one of the best programming languages to learn for a first language.If your kid finds typing frustrating, then Scratch might be a better language to learn. There is no “best” age to start programming; any age is fine. Learning to program, like learning anything, is not about having a high IQ so much as being enthusiastic enough to practice and wanting to learn more. Deciding on a Programming Language Next, you should decide on a programming language to learn. Programming languages I recommend you not start out with:

Must Have Git Aliases: Advanced Examples - Be Present Now Over the course of a few years I piled up a long list of git aliases. This post will assume you know what aliases are and you have defined a few for yourself. I rely on many of them dozens of times a day. And maybe some have slipped your radar. You can add all the examples below to the [alias] section of your .gitconfig. To acquire the full list of my aliases you can check out my .gitconfig on Github. Explore your history, the commits and the code Shorten and beautify your log command because you will use it a lot. List commits in short form, with colors and branch/tag annotations. And you can have it by adding this to your aliases section: ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate List commits showing changed files is invoked with git ll and looks like this: And you can have it with this: ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat List with no colors if you need to chain the out put with Unix pipes:

Git undo last commit Composition versus Inheritance | Chad Myers' Blog One score (minus five) years ago, in the age of yore and of our programming forefathers, there was written a little book. A seminal book. A book that would change things. That book was called Design Patterns: Elements of Reusable Object-Oriented Software. There were many other greater and some lesser (but still great) works that were released around the same time (1995), but this one has remained a popular favorite among the object-oriented development crowd for some time. But this post isn’t about design patterns. As I have grown in my understanding of design and architecture, I have come to realize that the first chapter — titled “Introduction” — of this book is actually the most valuable part of it. In this post, I’d like to go through a few of the important points in this short, but powerful portion of the book to drive them home. Programming to an Interface, Not an Implementation This one was a little more difficult to pull off in C++ due to its peculiar way of typing objects.

Using Git for Deployment - Dan Barber I’ve been using Git for deployment now for some time, and I thought it might be helpful to others if I document how I did it. Partly this is because I can’t find the original guide that I used, so if you recognise the method I use here and you did it first, let me know and I’ll attribute you! Update: This is the original article: Thanks to Tim for the link in his comment! For the purposes of this guide I’m going to assume that you have your website live already, and that it is not already in a Git repository. Setting up the server In order for this to work it will require two repositories on the server itself. We’ll start by initialising a repository in the live code directory on the server and committing the entire codebase. $ cd /var/www/myproject $ git init Initialized empty Git repository in /var/www/myproject $ git add . $ git commit The next step is to create a bare repository, also on the server, and push the live repo into it.

keep either file in merge conflicts committed 25 Feb 2009 Sometimes when trying to resolve a merge, you may want to keep one file instead of the other. You don’t need to open up the files and fix the potentially hundreds of conflicts, you just want to choose the one you want and be done with it. So, the scenario is: you’re in the middle of a merge, and you want to keep one file or the other. $ git merge master Auto-merged _layouts/default.html CONFLICT (content): Merge conflict in _layouts/default.html Auto-merged index.html CONFLICT (content): Merge conflict in index.html Automatic merge failed; fix conflicts and then commit the result. There’s two unmerged files here. The following commands will keep the original file for index.html, and then use the merged in file only for _layouts/default.html. git checkout --ours index.html git checkout --theirs _layouts/default.html Sadly, these options are only in Git versions 1.6.1 and up. git reset -- _layouts/default.html git checkout MERGE_HEAD -- _layouts/default.html

Starting An Open-Source Project Other installs Tutorial: Introduction to Unit Testing in PHP with PHPUnit It’s a familiar situation: you’ve been developing on an application for hours and you feel like you’ve been going round in circles. You fix one bug and another pops up. Sometimes, it’s the same one you found 30 minutes ago, and sometimes it’s new, but you just know it’s related. For most developers, debugging means either clicking around on the site, or putting in a whole load of debugging statements to hunt the problem down. You’ve been there, right? You’ve had these same frustrations with all your applications, and have sat back and thought that there has to be a better way. The key to understanding unit testing is to define what we mean by “unit.” Once you’ve written up your set of tests, whenever you make a change to your code, all you have to do is run the set of tests and watch everything pass. Debunking Unit-testing Myths I’m sure you’re sitting there thinking, “if this unit testing stuff is so awesome, why doesn’t everyone do it for all their applications?” It Takes Too Long <? <?

apt-get The Beginner's Guide to Unit Testing: Building a Testable Plugin In the first part of this series, we took a high-level look at testing methodologies and gave some cases as to why it's beneficial for us to begin doing in our WordPress projects. We also took time to setup PHPUnit and the WordPress Tests in order to begin building our first testable plugin. In this final article, we're going to define a methodology for unit testing, begin incorporating it into our work, and walk away with a fully functional (albeit simple) plugin that also has a small set of tests to ensure that it works exactly as expected. When it comes to testing, there are generally two ways to do it: Write your tests, then write code to make your tests passWrite your code, then write tests that pass In my experience, the first approach is always better. To that end, I find it better to write the tests first. With that in mind, we're going to be building with this simple methodology: Write a test and run it. Let's stub out the unit test class: At this point, you should see a failure:

Ubuntu GNOME | An official flavour of Ubuntu, featuring the GNOME desktop environment. » PHPUnit Training Course for free Programming the new world: Programming your life and the net, one day at a time Posted in November 4th, 2010 Today is an awesome day my dear fellow programmers. Today is the day I decide to freely distribute the first couple of pages of the PHPUnit workshop I have been giving for some time now. It is a workshop that builds a small demo application the Test Driven Development way. The reason I open this workshop course is because I strongly believe everybody should understand and use PHPUnit in their projects. Another reason is marketing. But the bottom line: you get a nice introduction to PHPUnit for free. Warm winter greetings from Belgium Nick

Related: