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:

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.

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 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 <? <?

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:

» 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

Bulletproofing Database Interactions with PHPUnit Database Extension There’s already a great article here that discusses Test Driven Development, but did you know that you can also test the code that interacts with your database? Especially if your application is data intensive, subjecting your CRUD code to a battery of tests is good practice that helps ensure that your application is working correctly. In this article you will be learning how to write database tests in PHP using PHPUnit and its database extension. Accompanying code can be found on GitHub, so feel free to check the source and play with it. For this exercise you’ll need PHPUnit and the PHPUnit Database extension. Editor Note Oct 20 2012: You can install both PHPUnit and the PHPUnit Database extension using Composer. Warming Up It’s time to get your feet wet! Imagine you are the back-end ninja of an online webzine and you’ve just received the spec for a new magazine you’ll be building: For this article, we’ll only test retrieving the articles when they are going to be displayed on the page.

Functional Programming in Javascript This is an interactive learning course with exercises you fill out right in the browser. If you just want to browse the content click the button below: This is a series of interactive exercises for learning Microsoft's Reactive Extensions (Rx) Library for Javascript. So why is the title "Functional Programming in Javascript"? map filter concatAll reduce zip Here's my promise to you: if you learn these 5 functions your code will become shorter, more self-descriptive, and more durable. Finishing the Interactive Exercises This isn't just a tutorial, it's a series of interactive exercises that you can fill out right in your browser! Note: Use the "F4" key to toggle full screen mode for each editor. This tutorial is on GitHub, and is asymptotically approaching completion. Your answers will be saved in local storage. Working with Arrays The Array is Javascript's only collection type. This section will follow a pattern. Traversing an Array Exercise 1: Print all the names in an array Filtering Arrays

» XDebug, PHP and Sublime Text 2 on Ubuntu 12.04 Getting Xdebug for PHP working with Sublime Text 2 is slightly tricky. Most of the instructions are at – these notes are just a bit extra as a reminder to myself. After installing Xdebug with “sudo apt-get install php5-xdebug”, you have to add some xdebug settings in /etc/php5/conf.d/xdebug.ini: zend_extension = /usr/lib/php5/20090626+lfs/xdebug.so xdebug.remote_enable=On xdebug.remote_host="localhost" xdebug.remote_port=9000 xdebug.remote_handler="dbgp" xdebug.remote_autostart=1 In ST2, you use SHIFT+F8 to get the Xdebug menu, and select “Start debugging”. ? The page request should hang while the debugger has control – if nothing’s happening in ST2, you’ll need to check the console window by using “CTRL`”. You may get this output: In which case you’ve got the problem with Python versions – 2.7 is the default on Ubuntu 12.04, and ST2 and the Xdebug plugin are using Python 2.6. Then restart ST2 and try again.

Quality metrics: A guide to measuring software quality Metrics have always been used to help guide managers with decisions about their organizations. However as technologies and methodologies have evolved, metrics must evolve as well. Defect tracking, for example, has traditionally been a metric used to measure software quality throughout the lifecycle. However, Agile methodologies suggest that pre-production defect tracking may, in fact, be detrimental to software teams. It can be difficult to determine which are the best for giving a true picture of software quality. This guide will provide insights for CIOs, senior managers and project managers in selecting the right set of metrics to effectively and efficiently manage their software development organizations. Is defect tracking necessary?

How to GitHub: Fork, Branch, Track, Squash and Pull Request This guide will teach you how to properly contribute to open source projects on GitHub. It assumes that you already know about how to use Git for version control and that you already have a GitHub account. Psstt.. if you already have a GitHub account and you want to earn more money, sign up for Gun.io with your GitHub profile and we'll pair you with people looking for developers based on your portfolio! Getting Started GitHub displays these instructions when you start a new project. GitHub is pretty great about giving advice to users starting new repositories, but it isn't very helpful when it comes to contributing changes back to other projects. Before you get started, find the page of the project you're looking to improve. Check the Network The network graph. The first thing to do is check the Network tab on the project to see all the other forks that other people have made. Opening an Issue You've got issues, man. Next, head over to the Issues tab. Making Your Fork Hardcore Forking Action

Related: