Skip to content

About SCRUM - Hamid Shojaee Axosoft
Syndicate content
Software development plus Axosoft and GitKraken product-related articles.
Updated: 15 hours 8 min ago

An Introduction to Monoids

Thu, 03/23/2017 - 17:30

When you think of programming, you might not immediately think of mathematics. In the day-to-day practice of writing software it’s often hard to see much theory behind REST requests and database schema migrations.

There is, however, a rich world of theory that applies to the work we do, from basic data structures to architectural patterns. This is the field of category theory, sometimes described as “the mathematics of mathematics”. Category theory is concerned with structure and the ways of converting between structures.

NOTE: This article is based on an Axosoft Dev Talk I recently gave, also titled Practical Category Theory: Monoids. Watch that video or keep reading!

Hopefully this sounds like the kind of thing you’re familiar with as a programmer, and if it doesn’t, hopefully it just sounds like a good ol’ time. After all, category theory doesn’t care about specifics; it’s abstract, which helps it be applicable to a great many fields.

Software therefore needs to apply the concepts of category theory to match the realities of programs that execute on real computers. You may have heard of some of these, especially if you’ve looked into statically typed functional programming languages such as Haskell, OCaml, F#, or Scala.

Semigroups

In talking about Monoids, we actually need to talk about two structures: the Semigroup and the Monoid. A Monoid is a superset of a Semigroup, so let’s start there. The Semigroup is a simple structure that has to do with combining. In the following example, I’ve combined two strings with an operator such as +:

helloWorld = “Hello” + “world”

And in this example, I’ve created a concatenating list:

parts = concat([“Parsley”, “Sage”, “Rosemary”], [“Thyme”])

Both these examples have some similar properties. They take two values of a certain shape and combine them into a single value of the same shape. We don’t take two strings and combine them to get a number or an array; it’s quite reasonable to expect the result remain a string.

Let’s start with just this single property, that there is some “append” operation that takes in two values of some type and gives back a combined result of that same type. In various languages this might look like:

C#
T Append(T first, T second)
Javascript with Flow
append(first : T, second : T) : T
Haskell, Elm, PureScript
append :: t -> t -> t

This may not seem like a particularly novel thing to do, after all, you probably do this sort of operation all the time on various kinds of data. Remember though, that we’re talking about a concept from category theory, so while the above type signatures are the end of the story in terms of what that compiler can enforce, we are obligated to obey a few more rules.

These rules are “things that must remain true,” and in math we call these laws. You’re already familiar with tons of these laws even if you haven’t heard them referred to as such. One example is with addition. When adding two numbers you can freely swap the order of the arguments, so 1 + 2 is the same as 2 + 1. This is the commutative property, and the law here is that swapping the order doesn’t affect the resulting value.

For Semigroups, we must obey the associative property, which has the law that the order in which you combine things does not matter. That is

(“hello” + “ “) + “world”

is the same as

“hello” + (“ “ + “world”)

As you can see this doesn’t mean we can swap the order, just that we can do our combine operation on any two adjacent elements, and when we’re all done we’ll end up with the same result.

The append operation is whatever you want it to be (as long as it obeys the rules)

Consider CSS classes. They’re kind of like a string, except when you combine them you don’t just shove them together; it’s more like we’re doing a join operation using a comma and space as the separator:

“app” + “button” + “selected”

should turn out to be

“app, button, selected”

CSS classes aren’t the only type where this is true; if you think in terms of Semigroups, there are lots of cases where fundamentally we’re combining two things of the same type, and that type has a unique rule around how to do the combination.

That’s actually all there is to Semigroup, an append operation that is associative. If you’re feeling underwhelmed, don’t feel bad! I was hardly excited when I first encountered the idea. Let’s dig a bit deeper to see how this unassuming structure punches quite a bit above its weight class.

For the purposes of grounding our discussion, let’s pick a few types that satisfy the rules of Semigroup. List is a straightforward data structure that every mainstream language supports (even if it’s named something else), so we’ll talk in terms of Lists moving forward.

Depending on the language you’re using, you might be able to express Semigroup as an interface or protocol, and you might be able to implement that interface/protocol on your language’s List type. If not, don’t fret! These ideas are still useful and applicable even if your language doesn’t give you a way to represent it in your type system (or if you’re using a dynamic language and don’t have a static type system). I’ll use square brackets to represent a list and the ++ operator for my List’s “append” operation.

bandMembers = [“Stevie”, “Lindsay”] ++ [“Christine”, “John”, “Mick”]

The second type we’ll consider is the String. For our discussion, we’ll use the same ++ operator to concatenate Strings.

greeting = “Hello” ++ “ “ ++ “World”
Interesting attribute #1: Semigroups are partition friendly

Consider the following SQL related code:

databaseQuery = selection ++ table ++ constraints

At the end of the day, we want to have a nice query we can use to get a result from the database. If our top level value is a String that makes up our query, then the associativity of Semigroups means that we have a lot of flexibility in building this up.

One example of this might be in building up the selection. We want to end up with something like:

select * from

or if we want specific columns:

select a, b from

It seems reasonable to build up this String from some fixed parts, the “select” and “from” mixed with some customizable parts, the “*” or “a, b”.

selection = “select “ ++ ”a, b” ++ “ from “

The resulting String will be combined with the other elements of the query, but it doesn’t matter when we decide to combine the elements, we could defer the column name conversion to a String by leaving it as a List.

selectionParts = [“select ”, [“a”, “b”], “ from”]

When we’re ready for a selection String, we could combine the column names first, then combine the resulting String with the other two parts. This same flexibility in when to go from a more structured form into a final string, is present in other parts of the query as well.

table = “myTableName”
constraintParts = [“where “, constraint1, “ AND “, constraint2]
constraint1 = [columnName, “ IS “, value]
constraint2 = [columnName2, “ NOT “, value2]

As developers, we can decide when it’s best to go from the representation of values in Lists to a final String form—either for a part or for the whole of our query. We can defer this decision through the layers of functions used to build up the query, and we know we can go from parts to whole for any section of the query—independent of any other part, and nothing will change.

We originally had:

databaseQuery = selection ++ table ++ constraints

Let’s see what the query might look like if we had all of the bits inlined:

databaseQuery = “select “ ++ “a, b” ++ “ from “ ++ “myTableName” ++ “ where “ ++ columnName ++ “ IS “ ++ value ++ “ AND “ ++ columnName2 ++ “ NOT “ ++ value2

If we were to recreate the order of operations in the original version, it would require us to group our values into 3 parts:

databaseQuery = (“select “ ++ “a, b” ++ “ from “) ++ (“myTableName”) ++ (“ where “ ++ columnName ++ “ IS “ ++ value ++ “ AND “ ++ columnName2 ++ “ NOT “ ++ value2)

But because of associativity, these are exactly the same. We can group the individual combinations however we want, which is effectively what we would be doing along the way by collapsing the various query parts into selection, table, and constraints.

This might seem obvious (after all we’re dealing with Strings), but the ability to arbitrarily partition your data and combine it, is useful for more exotic types as well. Imagine you have a type Log that represents a single logging event and is a Semigroup. You might have files filled with Logs spread across files that are rotated, grouped by date or time range, or some other bucketing criteria. Being a Semigroup means you can combine adjacent Logs into an aggregate Log in any order you want. You could split up the work of combining Logs across multiple threads and know that it is still 100% safe to combine the individual thread’s results into a final result.

Interesting attribute #2: Semigroups are “incremental combination” friendly

Carrying on with the idea of Logs, consider a remote logging service that accepts Logs from your various servers and aggregates them down into something you can do reporting on. If we still have a Log type that is a Semigroup, we have a lot of freedom in how we proceed. For example, when a Log is generated by one of your servers, it could send it immediately, or combine some number of Logs before sending them:

Remote Logging Server Worker Server Log <-worker sends Log immediately– Log Log ++ Log Log Remote Logging Server Worker Server Local Batching Log Log –> Log Log Log Log –> Log Log Log ++ Log …repeat until n logs or time limit reached… Log <-worker sends batched Log– Log

On the receiving end, you could accept the Logs and combine them with the main log as they arrive, or you could batch them:

Remote Logging Server Worker Servers Log <– Log Log ++ Log Remote Logging Server Local Batching Worker Servers Log <– Log Log Log Log Log <– Log Log Log ++ Log …repeat until n Logs or time limit reached… Log <– Log Log ++ Log Monoids

Ok, that’s a lot of things we can do with Semigroups, so where do Monoids fit in? Thankfully, Monoids are, by comparison, very simple. They are everything that a Semigroup is, plus an “empty” value of the type.

For Strings, this would be an empty string; for Lists it would be an empty List; for Logs… well, that’s slightly less clear. If you can define a concept of an empty value for your type though, then congratulations, your type is a Monoid. The types signatures for this sort of thing look like this:

C#
T Empty
Javascript with Flow
empty : T
Haskell, PureScript, Elm
empty :: t

You guessed it! There are laws that go along with Monoids, and this time there are two: the left and right identity. These state that combining the empty element with any value shouldn’t change the meaning of the value. That is, the empty element is an identity value for that type. Looking at the String we see that

“” ++ “some string”

is the same as

“some string”

This works on either the left or right side (hence the left/right identity):

“some string” ++ “”

is the same as

“some string”

This comes in handy when you want to append values but you don’t want to distinguish between having zero and having one already. Consider the case of the remote logging service:

Remote Logging Server Worker Server Log <-worker sends Log immediately– Log Log ++ Log

Where did that Log that the Remote Logging Service starts with come from? If Log is a Semigroup then we’d need to generate it somehow. However, if Log is a Monoid, we have our answer: the initial Log value on the Remote Logging Server is the “empty” value of Log. Since combining the empty value with a Log doesn’t change the Log, this is safe to assume, and now we can deal exclusively in terms of Log ++ Log operations. Less special cases means happier developers™.

There are lots more fun use cases for Monoids. One example is taking a Monoidal type in a list and running it through a fold/reduce/Aggregate operation, where the fold function is appended and the initial value is empty. You could write a specialized fold that only works for Lists of Monoids but can aggregate them with no other information needed.

Go forth and aggregate!

For something so simple as having an append operation, an empty value, and the associative property, I hope you’ll agree there’s a lot of depth to Semigroups and Monoids. This is just the tip of the categorical iceberg though. Due to its abstract nature, category theory can describe a variety of structures, and best yet, be supported by lots of formal reasoning (aka proofs).

This formal reasoning can give us a lot of confidence that what we’re doing really will work as long as we’re implementing our types in accordance with the laws of the structure. If you’re looking for next steps, Functor is a mild step up in complexity, but it’s equally as rich in terms of applications and reach.

Categories: Companies

April Fools Ideas for Techies

Wed, 03/22/2017 - 17:28

I am not much of an April Fool’s Day fan. Not everyone can achieve the giddy heights of, say, the BBC’s oldie but goodie prank on its viewers 60 years ago, and attempts to do so can be sadly ineffective. Nonetheless, April 1st is almost upon us, and as we welcome Spring back into our lives, we must also endure the one day that our workplace prankster (we’ll call him Tad) comes into his or her own.

It doesn’t have to be this way. You can strike at Tad first, as long as you have a few ideas up your sleeve. Here are some classic and alternative ways to make sure that Tad—and his silly unmatching socks and zany ties—don’t mess with you in the future.

WARNING: The following pranks can result in being:

  1. Tame to the point of failure: Prank is so tame it may genuinely go unnoticed, forever, with no consequences.
  2. Pretty underwhelming: Tad can easily shake it off.
  3. Mildly-to-actually annoying: This is the level you’re shooting for. These pranks hopefully disrupt Tad’s flow for long enough to give him a taste of his own medicine.
  4. Instant dismissal: Tad’s a real bore, but that doesn’t make it a good idea to pants him in the cafeteria or toss his laptop over the side of the balcony.
  5. Arrest: This includes but is not limited to: murder (murder is not a prank), violence, aggressive nudity, arson.

Ok, let’s get this out of the way so we can carry on enjoying our lives!

NOTE: A couple of these pranks are aimed at MacOS users, although they’re likely achievable on other platforms. They also require access to Tad’s work machine. To gain the element of surprise, consider a diversion tactic of your choice, or implement one or more of these pranks early (or even better, in August). 1. The low hanging fruit: Chrome Extensions

A good prank needn’t take the week to plan, and for the half-hearted pranksters out there, most of the heavy lifting has been done for you through the gift of Chrome extensions. It turns out there are a lot of good ones out there, but here are a few to get your creative juices flowing:

  • April First Prank Toolkit: You’ll be shocked to hear that April First Prank Toolkit is a toolkit specifically aimed at pranking people on April first. It has a bunch of options for easy-yet-effective prankage; some pranks are more subtle than others (and therefore, IMO, more effective as slow-burner pranks). These include hiding the cursor and randomly reloading tabs–actions that make it less immediately obvious that your victim has fallen fowl to a dastardly prank!
  • Prank ‘Em: Another toolkit; this one allows for subtle irritations such as a flash on the screen. Every setting has a frequency slider too, so you can make things happen intermittently for better covert prankular tactics.
  • Cenafy: This does one thing and one thing only (1/100 of the time): Gives you John Cena. It’s infrequent enough to be another winning slow-burner.
2. Keyboard typing replacements MacOS only

This one is short and sweet. Go to System Preferences > Keyboard and click the Text tab. Click the + symbol. From there you can replace ‘the’ with ‘teh’, for example.

NOTE: This replacement doesn’t work on every application, so you may have to be patient to see the fruits of your labors.

3. Application Overload MacOS only

Let’s get a bit more serious. In this prank, we’re going to create an AppleScript application that launches applications in a way that Tad isn’t expecting. When he launches Word, he expects Word to launch just once! Classic Tad. Let’s say you want to launch 20 instances of Word instead. Here goes:

  1. Open Script Editor (found in Applications Utilities)
  2. Select New Document
  3. Add the following script:
    on run
        set wordPath to "/Applications/Microsoft Office 2011/Microsoft Word.app"
        do shell script "open -n " & quoted form of wordPath
        tell application "Microsoft Word" to activate
    end run
  4. What does that do? Well, it assigns the path of Word to a variable. We can then run a shell script to open that path and activate the app. Now, lines 3 and 4 are crucial, because we’re going to call them again—19 more times (or however many you want to do:
    on run
        set wordPath to "/Applications/Microsoft Office 2011/Microsoft Word.app"
        do shell script "open -n " & quoted form of wordPath
        tell application "Microsoft Word" to activate
        do shell script "open -n " & quoted form of wordPath
        tell application "Microsoft Word" to activate
        do shell script "open -n " & quoted form of wordPath
        tell application "Microsoft Word" to activate
        do shell script "open -n " & quoted form of wordPath
        tell application "Microsoft Word" to activate
        do shell script "open -n " & quoted form of wordPath
        tell application "Microsoft Word" to activate
        do shell script "open -n " & quoted form of wordPath
        tell application "Microsoft Word" to activate
        do shell script "open -n " & quoted form of wordPath
        tell application "Microsoft Word" to activate
        do shell script "open -n " & quoted form of wordPath
        tell application "Microsoft Word" to activate
        do shell script "open -n " & quoted form of wordPath
        tell application "Microsoft Word" to activate
        do shell script "open -n " & quoted form of wordPath
        tell application "Microsoft Word" to activate
        do shell script "open -n " & quoted form of wordPath
        tell application "Microsoft Word" to activate
        do shell script "open -n " & quoted form of wordPath
        tell application "Microsoft Word" to activate
        do shell script "open -n " & quoted form of wordPath
        tell application "Microsoft Word" to activate
        do shell script "open -n " & quoted form of wordPath
        tell application "Microsoft Word" to activate
        do shell script "open -n " & quoted form of wordPath
        tell application "Microsoft Word" to activate
        do shell script "open -n " & quoted form of wordPath
        tell application "Microsoft Word" to activate
        do shell script "open -n " & quoted form of wordPath
        tell application "Microsoft Word" to activate
        do shell script "open -n " & quoted form of wordPath
        tell application "Microsoft Word" to activate
        do shell script "open -n " & quoted form of wordPath
        tell application "Microsoft Word" to activate
        do shell script "open -n " & quoted form of wordPath
        tell application "Microsoft Word" to activate
    end run
  5. Go to File Save
  6. Choose File Format: Application and call it “Microsoft Word”. Save it in a discrete location

  1. Hit Save
  2. You now have an app that will run Word 20 times when opened. But it still looks like a script!

  1. Find the REAL MS Word, right-click and select Get Info
  2. Click the application icon in the top-right and hit command + c
  3. Find your script, get info and click the script’s icon
  4. Hit command + v
  5. You now have an app that looks just like Word. Replace the actual Word icon in the dock and you’re set! This can be adapted to suit your needs. Maybe only have it launch Word twice—that’s enough to be a mild yet persistent annoyance. Or, have it open a nice selection of other applications.

4. Grunt Task Tomfoolery

This one’s a tad (ha!) obscure, but might be fun. WARNING: It could also be a fireable offense if your prank somehow makes it to production. You have been warned!

Let’s say Tad is working on a bunch of projects (typical Tad), and he uses Grunt to automate his tasks and build his websites. Open up one of his projects in the terminal and type:

npm install grunt-string-replace

Now open up Tad’s Gruntfile and add the task:

grunt.loadNpmTasks('grunt-string-replace');

In his build tasks, add 'string-replace' to the array of tasks.

Next, define that task! In the following example we’re focusing on the build folder, and it’s last in our list of tasks (this ensures that our hard work isn’t overwritten by subsequent tasks). We’re searching for all html files and replacing ‘the’ with ‘teh’ using a regular expression (defining a string as a pattern will only change the first instance).

'string-replace': {
    dist: {
        files: [{
            expand: true,
            cwd: 'build/',
            src: '**/*.html',
            dest: 'build/'
        }], 
        options: {
            replacements: [{
                pattern: /the /g,
                replacement: 'teh '
            }]
        }
    }
}

That’s it. Sit back and wait for Tad to run a build task. Of course, you could get more inventive with the replacements and perhaps only target one or two files. However, most importantly, remember that I never, ever, recommended you do this to anyone. Ever. Don’t do it.

Categories: Companies

Axosoft Dev Talk: React and Redux

Tue, 03/21/2017 - 16:32

In this talk, GitKraken developer Tyler Wanek discusses React and Redux, and their uses for one-way dataflow. Tyler will be using the following repo as an example:

https://github.com/implausible/React-Redux-SoDa-Demo

Fork and play along!

Part 1

Part 2

Part 3

Categories: Companies

Axosoft Tips III

Wed, 03/15/2017 - 20:06

Are you looking for ways to use Axosoft more efficiently? Well, you’ve come to the right place! Here are our 10 latest Axosoft tips.

Axosoft Tips
  1. You can quickly add a work log by right-clicking on any item OR by using the keyboard shortcut W .

  2. In Axosoft v17, quickly access sub-menus with our NEW Command Palette. Use the keyboard shortcut shift + p and start searching!

  3. Quickly refresh your workspace by clicking on the refresh button in the upper left corner of the main menu bar.

  4. Use the Show Charts button to quickly review the burndown chart and projected ship date for the selected release.

  5. In the Release Planner, click the remove all users with no work assigned to them icon to remove them from view.

  6. Collapse your workflow swimlanes in the kanban Card View by clicking the arrow icon in the corner.
  7.  Click the stamp icon in the Details panel to auto-stamp your description.
  8. Click the List View dropdown and select Sort by rank to see your items organized by stack rank.
  9. Want to change the order of items in your view? Click a column header to sort numerically or alphabetically.
  10. Once you’ve enabled Global Dashboard Settings for your dashboard widgets, you can update widgets all at once in Dashboard Settings.

Categories: Companies

5 Electron Apps You Need to Try

Tue, 03/14/2017 - 15:46

As you may already be aware, GitKraken owes the consistency of its cross-platform experience to the fact that it is built on Electron.

Electron is a powerful framework that allows developers to create OS-native applications through web-based technologies; essentially packaging web apps into native desktop apps that look and behave consistently across operating systems. The framework has gained significant traction in a relatively short period of time, with the official list of apps built on Electron continuing to grow.

There are some Electron apps that I would select as obvious favorites, including:

  • GitKraken (of course!)
  • Atom
  • Slack’s desktop app

I discussed the apps above in an earlier post, 10 Apps You Can’t Work Without, so I won’t repeat them here. Instead, I want to offer up a handful of lesser-known apps built on Electron that you might not have heard of and might want to try out. All these apps are listed on Electron’s extensive page of Electron apps.

5 Electron apps you should try 1. GIF Maker

GIF Maker is a utility to create GIFs from a variety of video services. For example, you can insert a YouTube URL in the URL field, hit the ‘create’ button and GIF Maker will generate a working GIF file for you. From there, you can make some edits to trim the file, apply balance adjustments, and resize the video.

The website touts that you can source from over 200 websites (although I’ve not had luck when testing it with Netflix), and you can also select a local video file for conversion.

GIF Maker comes in free and pro versions. Pro has more options; such as, video filters and more advanced editing capabilities. But the most obvious difference is that the pro version doesn’t watermark your outputted GIF.

2. ndm

ndm offers a GUI for managing your node packages. It has a logical tree view for differentiating globally installed and per-project modules. At a glance, you can see:

  • The modules you have installed for the current project/globally.
  • The current version of an installed module.
  • Whether or not there is an update available for each module.

You can also install new packages, and even update npm itself through the app.

Though not as fully featured as an app like CodeKit (which, in addition to offering a GUI for package management, can run compiling tasks through the client instead of via the command line), the experience in terms of package management is similar. It’s potentially a real time-saver for housekeeping node modules, seeing clear lists of which versions of packages you have, and seeing where package updates exist.

3. Kap (MacOS only)

I’ve been using screen capture software for years. In my freelance days, I would make short screencasts as educational resources; mini-tutorials to show how to make certain changes. However, there was never that sweet spot for functionality that covered all my use cases. Initiating a capture would often involve having to set numerous options, such as: compression settings, framerates, etc.–frankly the kinds of options I’d rather see after recording in a compression app. GIF creation for shorter captures wasn’t even an option, and although we now have functional apps like LICEcap, Kap  covers all the bases, offering a simple MP4/WebM format, or a GIF capture option from the same app. Define your capture area, click record and you’re on your way.

The real power in this app is its simplicity, which I would argue helps get work done better than more feature-rich or option-heavy screen recording apps. It’s solid, stable, and, like the best restaurants, doesn’t give you too much on the menu as an obstruction to getting started.

4. Hyper

Hyper  is a terminal app that is based on HTML, CSS and JavaScript. It is inspectable, meaning that from within the app you can look at and manipulate the UI. Like this, for example:

You can modify the app’s config file to apply changes to the UI according to your needs and tastes. In this regard, Hyper has a similar to Atom in its ease of hackability, and like Atom, it has a plugin system (Hyper’s plugin management uses npm).

Hyper is also open source.

5. Google Play Music Desktop Player

If, like me, you’re using Google Play as your music service of choice, you’ll know that your only real official desktop solution is opening the web app in your browser. Google Play Music Desktop Player  (how did they think of that name?) is a third-party app offering a material-like interface for your Google Play music playback, as a discrete application.

It doesn’t offer offline playback, but it does allow you to keep your listening separate from your browsing. It also allows for deeper levels of customization than would otherwise be easy to achieve from the browser, such as notifications, hotkeys, and minimized playback. It also allows you to customize the look of the app.

Additionally, Google Play Music Desktop Player is open source!

Categories: Companies

GitKraken v2.2

Thu, 03/09/2017 - 17:35

Did you enjoy the Oscars the other week? Well, we’ve got a few announcements of our own to share, all of which we’re certain are correct, all focusing on version 2.2 of the “Best Git GUI in a Leading Role,” GitKraken.

So, take a seat out front between Jack Nicholson and George Clooney, and let’s open some envelopes!

GitLab Integration

GitKraken has had GitHub integration and Bitbucket integration for some time. And now, we’re excited to add GitLab to our list of nominees for “Best Remote Service in a Supporting Role,” as we add it to our family of integrated services!

But couldn’t I already connect to GitLab repos, John?You

You could indeed; GitKraken has always allowed you to connect to most remotes on most services, but we’re talking integration. Consider the GitLab tanuki. Before, it was a tanuki, and that was cool. Now, it’s like a tanuki with a rolodex, a filofax, a cellular phone and a sharp suit with shoulder pads. It’s an on-task tanuki, pumped and ready to go, and it remembers who you are.

Rough impression of what a turbocharged tanuki might look like

So, now you’ll see that darling raccoon in the tabs for integration services, just like you see GitHub and Bitbucket. Here’s what you can do to make using GitKraken with GitLab that much more simple:

  • Add and remove SSH keys: From Preferences Authentication, you can now quickly generate and manage your keys. It’s easier than announcing the correct winner of an Academy Award for Best Picture!
  • Initialize a repo
  • Clone a repo from a GitLab account by browsing for it and selecting it
  • View GitLab remote avatars in the graph and (**spoiler alert**) left panel

We’ve been really excited about getting this integration into the app. We will continue to work closely with GitLab to leverage the capabilities of their API.

New Repository Management View

Take a peruse of your repos in GitKraken for a second, and you’ll notice some big changes that may just wow you on the red carpet. Plenty of users have requested that the repo management interface be tidier and more intuitive, so the new Repository Management View has been created as an entirely different way to organize and open repos. In this view, users can now:

  • Browse the file system for a repo to open
  • Open a repo from a list of recently opened repos
  • Create custom project folders that contain groups of repos.

That last one is a big deal for the convenience of GitKraken users. Folders that contain groups of repos can now be added to GitKraken as Project Folders, and these folders can be discretely named in the app. Your folder outside of GitKraken will keep its name, of course.

Needless to say, you can still clone and init repos as usual, just in a spiffier UI that makes working with connected services more clear.

Avatars in the Left Panel

In a controversial leak earlier in this article, we shockingly exposed the inclusion of left panel avatars in v2.2. Version 2.1 introduced avatars in the graph, and the addition of the left panel means that the owners of remotes are now clearly visible and more instantly identifiable at a glance.

HTTP and Proxy Credential Storage

Such is the drama, intrigue, excitement and sheer sexiness of this topic that it can be hard to relate the details over all the commotion. I’ll give it a go.

When entering a username/password for a host, GitKraken will now ask if you’d like to remember those credentials. Changed your mind? We all get cold feet once in awhile so stored credentials can be purged in Preferences Authentication.

That just about covers the major new features in this release. OMG OMG there are just too many people to thank! Please be sure to check out the release notes for a full run-down of what’s new, including features, improvements and bug fi–<cut out by orchestra>

Categories: Companies

U, I and Everything In-between…

Wed, 03/08/2017 - 19:25

Until recently, some of our customers have been, shall we say, forthcoming in their feedback on our UI and their frustrations with it. Some were eloquent in their summaries. Here’s a good example:

Every time a developer opens up axosoft, a UI designer dies.

— Douglas Isaksson (@DouglasIsaksson) November 18, 2015

OUCH. But fair.

We appreciate all criticism, and we take it seriously (especially because we don’t want to be responsible for thousands of designer deaths per day). We knew that the time was right for UI improvements, but the opportunity really presented itself recently, when Axosoft’s marketing team finished a rebrand with a new look and visual aesthetic. This was the perfect starting point for our designer to create a visual exploration of how a reimagined Axosoft UI might look.

And so the journey begins

With a laptop and a dream, the Axosoft team embarked on what would end up being a 4-month journey through a forest of UI and UX micro-improvements. There were arguments. There were certainly tears. There were moments when discussions about hex values produced faces in pure #ff0000. But we came through it, and the process helped us set the stage for the next version of Axosoft. Here is a rundown of what went into just a few of the many changes we made, and why we made them.

Colors… more colors!

The most noticeable change in Axosoft is the color palette that was applied across the system. The design and marketing team had developed the brand and provided general direction, using our internal style guide to help us apply things to Axosoft. One of the ways we applied color to enhance the experience was through making more visual distinctions between larger segments of the application to allow people to see groups of content more clearly and to make sense of a system with less thinking.

Principles like this are nothing new, and in fact, they correlate to a well-known theory in cognitive physiology: Gestalt. The mind wants to group things together that make sense, and in this case, the Organize panel’s behavior and functionally made it a candidate to visually separate it from the list of items in the main view of Axosoft.

Comparison of the color and tone of the UI before and after V17.
On the left (before), all 3 regions are of similar color and tone, suggesting equal relation. On the right (V17), the Header and Organize Panel are recolored to provide a visual connection between those panels. This reinforces the fact that these two panels contain UI elements that control the display of the Main Panel.

Additionally, many people often found themselves confused about why certain work items were not in view. It turned out that for most of these cases, certain selections and filters were applied without the user being able to clearly see that this was the case.

Utilizing color to help identify some of these states has made it easier to see that there is a change in the system and that your view has been altered. One area where this revision can be seen is in searching your work item list. Along with in-context search messaging, we added in some of the key alert-focused colors from the design system to make it easier to identify when a search is active in the UI.

Signal to noise, I can’t hear you. Is this thing on?

What are we looking at? This may seem like an obvious question, but it can be hard to answer if you work with any large-scale application. In an ideal world, the tasks and behaviors that are used most routinely are the ones most visible. We felt it was time to move some of the less used UI elements of Axosoft out of the main area so they would compete less with the more important elements. These lower-order elements are still easily accessible but aren’t clogging up the main area. The visible toolbars are the biggest areas where we applied these types of changes–reducing the number of visual options helps make it easier to choose the existing ones. We also increased the size of the components within the main toolbar, while reducing the size of surrounding elements to reflect the priority they should have when you’re using Axosoft.

By reducing the number of options in the main toolbar and removing the toolbars from individual panels in the UI, it is far easier to focus on relevant content instead of deciphering where things are and what they do.

I suggested the tagline “Axosoft, now with 72% fewer toolbars!” to the marketing team, and the enthusiasm in the room was palpable:

It’s the little things…

Some UI changes are more subtle than others, yet can have a huge impact on the day-to-day usage of an application. We made quite a few of these changes in version 17.

Counts for your item details

While we removed things that were less relevant, we also added some that were more so. Simply by adding a number next to each item in the right panel, it is now easier to see not only whether information exists or not, but also how much information is there. Knowing the difference between 2 work logs vs 14 can be important in understanding how much attention a particular work item is receiving compared to another.

Sorting, sizing and ordering your stuff

One of the most powerful aspects of Axosoft is its customized views, which can be set up and defined by each user. There were particular areas in the application that made it difficult to perform some expected adjustments (or did not allow it at all), such as moving content around within the Organize panel, or resizing the lower details when viewing an item in a new window. As these issues were identified, we tried to make it easier for users to manipulate the Axosoft UI for their needs.

The Organize panel sections now have menu options that can easily be repositioned within the group, and you can immediately sort your comments or history from within each detail section, instead of having to manage this elsewhere.

These changes may seem like subtle solutions to trivial issues, but such issues can add up to be considerable annoyances. Our aim is to continue making these improvements to annoy you less!

Categories: Companies

GitKraken vs the CLI

Fri, 03/03/2017 - 00:28

There are quite a few things that I do every day in GitKraken that make my work easier. When I just worked with my repos using the command line, these tasks were always a hassle. Maybe, sometimes, the hassle is worth it. Imagine you’re Tom Hanks and you bring an old, manual typewriter to a baseball game to keep score. Now, admittedly, that is really cool, but it’s not something I’d want to do all the time, and the idea of typewriter-like permanence in Git operations makes me shudder a shiver of pure fear. So, in honor of Hanx, I thought I’d share 6 reasons why I prefer GitKraken over the hassle of just banging away on the keyboard.

Click image to download this infographic as PDF 1. User Friendly

The CLI has a steep learning curve because you have to memorize commands and understand what those commands actually do. GitKraken, on the other hand, is a great tool for learning and teaching Git. GitKraken allows you to simply make a few clicks to perform commands and then provides a visual representation of the commands so you can see their effects.

See that big Undo button up top? That means that if you make a mistake, there’s also a good chance you can undo that mistake.

2. Speed

With GitKraken, you can drag and drop to quickly merge, rebase, reset, push, and more. If you need to undo a commit, simply give the Undo button one quick click.

I also love being able to easily see all of my work in progress; I can stage, discard, or stash any changes as I wish, so I don’t accidentally commit small mistakes. It makes me feel fabulous and powerful like I’m on the Bachelorette, and I can see which hunks I want to keep and which can be discarded.

3. Performance

Ok, look, it’s a GUI, and with a GUI there’s always some trade-off between the convenience of the UI and the demands on your CPU. I’ll admit that the CLI will be less taxing on your machine than any GUI out there, but you’re still getting bang for your buck when using a client.

The background processes that often run on a GUI, though they affect your CPU usage, are often also a great convenience to the end user, keeping up-to-date with file changes, for example.

4. Remote Control

If you’re tracking multiple remotes from your team, it can often be difficult to differentiate your local work from changes on other forks. With GitKraken, you can always see the avatar of the user on GitHub or Bitbucket, to know whose branch you’re viewing, or you’ll see a computer icon for your local changes.

Creating and viewing pull requests is something I do all the time, and I really couldn’t do them in the command line. With GitKraken, I can create new PRs, view my existing PRs in the repo, and even add the remotes attached to the PR if I don’t already have it pulled down.

5. Preference

I hate Git Spaghetti.

An actual Git commit graph from 1918

We’ve all witnessed a commit graph that is a mess of merges and branches that people forgot about. In many cases, this mess can accumulate because people have pushed without being able to visualize what’s going on. My history has been much friendlier and cleaner since switching to GitKraken. Now it’s more of a nice tidy riGitoni instead of a messy Git spaghetti.

Bonus: GitKraken Frees up my terminal

Just because I’m using GitKraken, doesn’t mean I am ending my relationship with the terminal. In fact, GitKraken allows me to use terminal for other essential tasks like updating npm packages, starting/stopping processes, using vim to edit a file, or even to play a game of Zork without having 8 different terminals open.

What’s more, GitKraken can augment the way you work with your repos and, if you still want to launch the command line to scour the reflogs or to play some nostalgia 80’s text based games, just use the keyboard shortcut alt + T (Windows/Linux) or option + T (MacOS).

Categories: Companies

6 Popular Atom Packages

Wed, 03/01/2017 - 21:40

Here at Axosoft, one of the most-used tools, unsurprisingly, is the humble text editor. No matter what kind of developer you are, you likely have your own setup for the editor you use: theme, keyboard shortcuts, add-ons; everything configured just the way you like it.

At Axosoft, the most popular editor of choice—by far—is Atom: GitHub’s functional, flexible, open-source, cross-platform editor. Out of the box, Atom is a very capable app that doesn’t take long to feel familiar. But its real strength lies in its extensibility and hackability. This is a real boon to developers with their own unique requirements, languages, preferences and habits. Should you need to, you can tweak config files, or create entire plugins to extend Atom’s base functionality.

These days, there are lots of packages available for Atom, and they’re easy to browse and install from within the app. Here’s a roundup of some of the most-used packages around the Axosoft office.

Our 6 Most-Used Atom Packages 1. linter/linter-eslint

https://atom.io/packages/linter
https://atom.io/packages/linter-eslint

The most popular plugin with our devs, is a combination of two plugins for linting code. A linter is a program that assesses code for probable errors and for enforcing a consistent coding style. The base linter, combined with a JavaScript linter installed on top of the base, is the combo of choice with developers at Axosoft. Syntax typos begone!

2. highlight-selected

https://atom.io/packages/highlight-selected

As you may have guessed, the “Highlight Selected” package highlights your selection; in fact, it highlights all instances of that selection in the document. Simple, but effective if you need a quick reference to all visible instances of a string.

3. pigments

https://atom.io/packages/pigments

Pigments is an indispensable package if you’re working with colors and variables. Pigments highlights all color values (hex, rgb, rgba) with the color that value represents. Among other settings, you can choose the “marker type,” opting for, say, a color dot next to the color value rather than highlighting it in that color.

Pigments supports precompilers, too, so you can use Stylus, Less, Sass, or Scss and it’ll highlight functions and variables that represent colors. Need examples? Well, we all know that Chuck Norris’s hex value is #bada55, but here are a few Stylus suggestions for you:

rocky                  = #ba1b0a
ringo-starr            = alpha(#bea71e, 0.5)
whats-that-smell       = #badc0d
whats-that-other-smell = #faece5
4. minimap

https://atom.io/packages/minimap

Minimap offers an at-a-glance graphical preview of the current document’s entire source code. The package’s home page shows the copious configuration options, but even without setting those, Minimap offers a really easy way to work out where you are in your code, and quickly get to where you need to be.

Combine this package with the minimap-highlight-selected package to see all your selections in the map!

5. regex-railroad-diagram

https://atom.io/packages/regex-railroad-diagram

Do regular expressions fill you with the kind of dread otherwise reserved for dental surgery, high school reunions, going to the DMV, or, actually having dental surgery at your local DMV performed by one of your old high school friends? If so, Regex Railroad Diagrams might be the answer to your prayers. This package offers a visual view of your regular expressions so it’s easier to debug their behavior.

6. rulerz

https://atom.io/packages/rulerz

Where did my cursor go? Where am I in this row? I’m frightened! If only there was a little vertical bar that followed my cursor on the screen, subtly giving me a visual reference for where I am!

Ah, there’s a package for that. Rulerz gives you a simple vertical rule to help you know where you are. What’s more, it’s customizable, thanks to Atom’s stylesheet. Here’s a modest example:

atom-text-editor.is-focused::shadow {
    ruler-view.rulerz {
        border: 10px solid #5234d4;
        width: 500px;
        box-shadow: 0px 0px 10px 10px #ff0, 0px 0px 100px 10px #f00;
        background-image: url('http://i.amz.mshcdn.com/AMO_a36WMI0rtWvQfnvIO8M_PZA=/1200x627/2012%2F12%2F04%2Fa9%2Fnyancatstar.aDm.jpg');
        background-size: contain;
    }
}

Gives you:

Ah, that’s better. And you are most welcome.

Categories: Companies

Integrating Trello with Axosoft

Thu, 02/23/2017 - 17:16
What is Zapier?

Zapier is a powerful automation engine that connects with hundreds of applications. It’s also a developer platform that allows you to create your own integrations if they’re not supported out of the box.

Axosoft has been a part of the Zapier ecosystem for about 2 years! So, it seems appropriate to celebrate our 2nd anniversary with a public display of affection. The 2nd anniversary is traditionally cotton, so in honor of our favorite Zap ever, let’s call it the ‘velour’ anniversary.

What is a Zap?

A Zapier integration is called a Zap. Even at its most basic level, a Zap can function as a simple-yet-powerful middleman between two services, but nonetheless, all of the possibilities can be a little overwhelming. So, I wanted to offer a popular Zap example: integrating your Trello board with your Axosoft account.

Axosoft + Trello Zaps

Axosoft is a great Scrum project management tool for your development team to manage your backlog, but if you have some team members that insist on a different platform like Trello, you’ll need a way to have the two platforms communicate with each other to avoid task management becoming a cumbersome and inefficient process. Zapier allows you to butt your processes up against each other so you can disseminate tasks to devs on those other platforms.

Create Axosoft items from Trello cards

Imagine a distant land where a company is doing contract work, and the funnel of receiving requests consists of generating a statement of work, and then only sending the task to get worked on in Axosoft after payment is processed. All you’d need is a Trello board with a step called ‘Send to Axosoft’. You’d then make a Zap so that any cards dropped into that step would create the item in any Axosoft Project you select, and would be ready for your devs to work on.

Oh, looky here… We have that Zap for you!

Or you can check out the Zap’s page here.

Create Trello cards from Axosoft

Of course, the reverse is also possible! But you want another example, right? Here goes: sometimes our Marketing team has to follow up with some of the changes in the product, in order to update our version history or documentation with new features. Zapping those over to a Trello board might be pretty handy.

You didn’t think we’d have one for you and not the other, did you? Oh ye of little faith, here you go:

And here’s that Zap’s page.

So, when your developers are done, err, developering, you can have items Zap over to a Trello board!

Start Zapping

If you feel inspired to start Zapping away, you can create a free Zapier account and get creative. You can also check out other cool and useful Axosoft integrations through Zapier in our Zapbook.

To see all the source control, live chat, test case management, and other tools that Axosoft integrates with, visit our integrations page.

 

Note for Axosoft Installed users:

You need to use the Zapier app dedicated to Axosoft Installed systems.

Categories: Companies

GitKraken Meetup Package

Mon, 02/20/2017 - 17:00

Here at Axosoft, we’re passionate about supporting the development community. For 13 years we’ve been helping grow the tech ecosystem in Arizona by opening up our space to Meetup groups, sponsoring and speaking at local events, and partnering with like-minded organizations. When we can, we also travel to speak at conferences and connect with developers across the globe.

However, what we really want is to be able to connect with devs outside of just our local community more consistently. So we thought, what better way to do that than by supporting your local developer Meetup groups with all the best goodies! Here’s what our new GitKraken Meetup Package includes:

GitKraken Meetup Package GitKraken Meetup Package
  • Food and drinks budget of $200
  • GitKraken stickers for all attendees
  • Several GitKraken shirts for giveaways
  • GitKraken Pro promo code for $10 off a 1-user GitKraken Pro annual account, for every attendee
  • Our GitKraken Cheat Sheet
Developer Meetup Requirements

We know it won’t be possible for us to send packages to every Meetup (unfortunately), so we’ve put together some basic requirements that your developer group must meet in order to be eligible to receive a package:

  • Must be an established Meetup (or group) with a publicly accessible page
  • Must be a developer-focused event
  • Must have 40+ attendees regularly

We also ask that you help us spread the word about GitKraken by playing our 90-second Intro to GitKraken video during your Meetup and tweeting @GitKraken with a photo of the Meetup and your Meetup hashtag if there is one.

Categories: Companies

Introducing Node Sentinel File Watcher

Thu, 02/16/2017 - 17:06
Node whatnow?

Node Sentinel File Watcher (NSFW). It’s a file watching module built for Node.js. I built NSFW to overcome an obstacle we were encountering while developing GitKraken, and I released it as an ongoing open-source project. It’s actually entirely safe for work. Ideal for it, even.

NSFW is a native Node module, which means it is developed and written to run natively on an operating system without an interpreter (JavaScript uses an interpreter, whereas a language like C++ compiles to machine code).

NSFW has a file watching implementation for Linux, MacOS, and Windows, which are wrapped and bound for the node runtime to utilize. Thanks to its native implementation, NSFW is able to watch recursive directories on all operating systems in a very performant way.

What problem does NSFW solve?

At this time, Node has pretty poor support for file watching. Every operating system has a different capacity to watch directories. Here’s what some celebs have been saying on Twitter:

Linux can’t perform recursive directory watching. MacOS doesn’t provide the filename when a file was changed.

Add to these the fact that there are numerous unsolved issues for Node’s file watcher and that Node does not have a consistent experience across operating systems.

How does NSFW solve the problem?

NSFW solves the poor file watching experience on Node by utilizing 3 low-level file watching utilities written in C++ and targeted for the Linux, MacOS, and Windows operating systems.

NSFW does most of its work on a separate thread, giving it big performance gains over the built-in Node file system (FS) watcher API. NSFW queues file events on a separate thread and batches file change dispatches into a single callback. That callback can be throttled internally to prevent spamming the JavaScript/C++ bridge.

This means NSFW doesn’t slow down JavaScript applications, even when they’re under the load of large FS operations.

Linux, MacOS and Windows each ship with their own file watching APIs. Since NSFW’s watch utility is targeted specifically at each of those APIs, it means the experience of using the module is consistent across all three OSs. NSFW fills in the gaps for each API so they’re all consistently feature-complete:

  • Linux: The Inotify file watching system does not perform recursive directory watching, so NSFW builds and maintains a recursive watch tree for you.
  • MacOS: FSEvents is known to produce inconsistent file events (the file event bitmask becomes corrupted if events occur too quickly), so NSFW stats and disambiguates file change events for you.
  • Windows: supports all targeted needs out of the box. (RECORD SCRATCH) That’s right, Windows has the best native support. I said it.
Why this was an important problem for the Axosoft dev team to solve

GitKraken is currently the primary consumer of NSFW. A good Git client should not ship with a refresh button because it should automatically know when things change.

What could have been: Imagine if GitKraken needed a refresh button like this. Gross!

NSFW is essential to the smooth, cross-platform experience of GitKraken, as it helps the app respond quickly and accurately to changes in a repository it is viewing. NSFW is a quiet and humble, no-frills background process. It doesn’t make waves. It doesn’t talk through movies, chew loudly or snore, but its transparency is its strength; if you notice it, it’s more than likely because something isn’t working. So cheers to watching files silently and effectively – something made easy by the NSFW module.

Development hurdles

Oh yes.

With no experience in any of the file watching APIs, little experience in the Native Abstractions for Node (NAN) API, and no clear understanding of how to model the interactions Node makes with each file watching utility, the 0.x.x NSFW releases were, umm, troubled.

On Windows, I tried using C++/CLI to use the fancier file watching module provided by the .NET library. While this made it quick to get up and running, it inevitably backfired, because some users were unable to run GitKraken due to missing library dependencies. Sigh.

I also encountered strange errors related to having two distinct garbage collectors running concurrently (one for Node and one for the managed file watcher). When I scrapped the .NET implementation, I achieved much stronger stability for the Windows operating system.

On Linux and MacOS, issues revolved around unfamiliarity with the file watching API and native constructs. The overall unfamiliarity combined with the different strategies each operating system incorporated, ended up turning the entire project into a spaghetti turd. [REDACTED: DEEMED NSFW BY THE AXOSOFT DEPARTMENT OF PROPAGANDA]

Finally, large file change operations slowed down every operating system. At the time, those messages had no throttling behavior. The Node application would get absolutely hammered by file system change notifications and slow to a crawl. We suffered the consequences of that in GitKraken whenever we walked through our bootstrap process, which involves a lot of file manipulation.

After fiddling around with the project through the 0.x.x months (aka The Dark Times), I learned a lot about how each underlying file watcher API works, including their caveats, demands, and broken bits.

After spending a week putting together a complete system diagram, I scrapped the entire 0.x.x project and rebuilt the project to handle the differences of each operating system in a planned way. I also did away with the C++/CLI interface and opted for ReadDirectoryChangesW in Windows.

A couple of lessons learned
  1. Predicting a system’s architecture without first dirtying your hands with the core features, means you’ll probably end up throwing away your project, dirtying your hands with the core features, and starting the project over. As a new developer, be prepared to throw away your prototypes.
  2. I’m not sure if C++/CLI and Node should ever be a thing. Ever.
Categories: Companies

GitKraken v2.1

Tue, 02/14/2017 - 18:01

It’s that time of year again. Whether this is a time of lavish attention for you, a time of dread and low self-esteem, or merely an opportunity for you to shake your fist at the cynical commodification of love and affection, we can all agree on one thing: It’s Valentine’s Day, sweetie.

And what greater gift could be bestowed on this most romantic of occasions than a new version release of your favorite Git client, GitKraken?

As usual, you can check out our release notes for the detailed breakdown of what’s new, but here’s a quick summary of what you can enjoy from this most salacious of software updates.

Remote Avatars

It’s always good to put a face to a name, and your remotes are no exception. In a major quality-of-life update, GitKraken now displays your cute remote avatars right in the graph. Doesn’t sound like a big deal, lover? Try having a bunch of refs in your graph and quickly distinguishing between them, honey. Prior to v2.1, this was an obstruction to the efficiency of the app.

As of version 2.1, you can quickly and easily see whose remotes are where, with those remotes being visually identifiable at a glance. (Please note that we can’t vouch for the aesthetic quality of your team members’ avatar choices, though. We’re good, but there are some things we just can’t fix, sugar.

Categories: Companies

Axosoft Donates $17K to ACLU

Thu, 02/09/2017 - 00:46

Last week, in response to the executive order banning entry of refugees and visa holders from seven countries into the US, Axosoft Founder Hamid Shojaee announced that Axosoft would be donating 100% of GitKraken Pro revenues to the American Civil Liberties Union (ACLU), over the course of 3 days.

We were not alone in taking a stance against what many have been calling the ‘immigration ban’. Multiple prominent executives of tech companies have also shown their support by offering to match donations to the ACLU: Stripe CEO Patrick Collison, Nest founder Tony Fadell, Slack CEO Stewart Butterfield, and Facebook’s head of advertising Andrew Bosworth, just to name a few.

Thanks to tech executives and nearly 1 million people who have made online donations, the ACLU has received over $79 million in new contributions since the election. We’re happy to announce that we’ll be adding another $17,030 to that total!

check to the ACLU

The ACLU is using these donations to continue its 97-year-long battle for justice, equality, and democracy. The ACLU has even been accepted into the winter batch of companies enrolled in top Silicon Valley startup accelerator Y Combinator. The nonprofit will receive mentorship and guidance on how to best utilize donations to grow the organization and its infrastructure.

Categories: Companies

Eating our own Dogfood

Wed, 02/08/2017 - 20:42

I remember when 3D printers were first becoming accessible to everyday makers. One of the new printers touted its ability to replicate itself by printing parts that could make another 3D printer which could print parts for another 3D printer, and so on.

This recursive concept was really interesting, and something I thought about when we were asked this question in one of our recent GitKraken community Slack AMAs:

“Do you manage GK source code completely from GK? If so, how long did it take to be self-sufficient?”

Just like those self-replicating 3D printers, we do in fact use GitKraken to make GitKraken and have been doing so since around version 0.0.3, when it was just a tiny baby Kraken. Using only GitKraken, even in its infant state, was an important exercise that helped ensure we were including features that developers actually needed. It helped us to constantly improve the user experience with each release—because a “powerful” tool that is awful to use isn’t much good to anyone.

If you’ve ever wondered how developers use their own tools that make those same tools, allow me to give you a bit of insight into our process, and show you how GitKraken is vital to its own creation. In this existential journey, you’ll learn how GitKraken devs use GitKraken to make GitKraken.

Imagine you are new to the GitKraken team and eager to start contributing to development. You have a GitHub account right? You do. Everybody has a GitHub account (how do you think grandma submits pull requests to the Linux repo?). So, we would give you access to the GitKraken repository on GitHub (lucky you!) where you would fork your own copy of the GitKraken source code. This is important because it gives you your own safe sandbox to play in without breaking the production version of GitKraken.

Equipped with a safe repo with which to experiment, you’d download and install your own copy of GitKraken, skipping the task of installing Git altogether if you so choose. Then, since you’re working on a GitHub hosted repo, you’ll want to take advantage of GitKraken’s powerful GitHub integration by signing in with your GitHub account. This allows GitKraken and GitHub to talk with one another in a seamless way.

Simple sign-in with GitHub account

You’ll get a glimpse of the power when you go to clone the GitKraken repo. Instead of going back to GitHub to get a clone URL, just pop into the GitHub tab in the Clone menu, and search for the repository you want to clone. Because you’ve connected GitKraken with GitHub, all the repos you have access to will be searchable in GitKraken for easy cloning.

Cloning with GitHub integration

With your repository cloned and opened in GitKraken, you’ll have a local version on your machine and a remote connection (origin) already set up to the main GitKraken repository on GitHub. Remember that fork you made on GitHub? You’re going to add that as a remote, using that slick GitHub integration, to find your repo on GitHub instead of leaving GitKraken.

Adding another remote

New squid-chan remote

All GitKraken developers work from their own forks of GitKraken. Adding those as remotes in GitKraken gives us an overview of who is working on what, and makes it easy to check out someone else’s branch to collaborate with them or review their work. We can also hide the remotes we don’t need to see, keeping the graph tidy. This reduces the number of auto fetches that occur to keep everything up-to-date. Hidden remotes can still be fetched manually from the context menu with a right-click.

Viewing and hiding other team members’ remotes

Having personal forks of GitKraken makes creating pull requests (PRs) on GitHub even easier thanks to drag-and-drop actions in the left panel. Most of our work is merged into development first for review and testing before it is included in a staging build. When a developer has finished working on a branch, that gets pushed to their remote where it can be dragged and dropped onto origin/development to start a PR from GitKraken.

Drag-and-drop to start a PR on GitHub

GitKraken’s GitHub integration continues to save time in our workflow by allowing us to open a PR with all of the relevant information pre-filled in a simple form. All we need to do is add a basic title and description then submit it to GitHub. For more detailed editing, the PR can be easily opened in GitHub directly from GitKraken.

Creating a pull request on GitHub from GitKraken

After pull requests are created, we assign developers to review them using GitHub’s pull request review system. In GitKraken, we keep track of open PRs in the left panel and can easily open them in GitHub to review.

Upon approval, a mysterious DevOps process occurs that merges that PR into development, which is used for staging builds for QA to check, and eventually a shiny new release is bestowed upon the world for all to enjoy. Pulling back the curtain on that is an article for another day.

Categories: Companies

GitKraken Tips IV

Mon, 02/06/2017 - 23:48

Welcome back! We’ve got 9 more tips to help you navigate GitKraken more efficiently.

If you haven’t been keeping up with this series, check out roundups 1, 2, and 3 for more tips.

GitKraken Tips
  1. Switch between dark and light themes in UI Preferences. We gave the light theme some love in v2.0!
  2. When viewing file history, select a commit to view its diff then click the commit SHA to jump to that commit in the graph.
  3. Use keyboard shortcuts to quickly stage S or unstage U selected files in the right panel.
  4. Shortcut cmd/ctrl + \ will minimize or expand the left panel to make room for larger commit graphs.
  5. Quickly zoom in/out of GitKraken with cmd/ctrl + +/-. Reset to 100% with cmd/ctrl + 0.
  6. Remotes can be fetched individually from the left panel – no need to fetch them all!
  7. Check out a branch 4 ways: 1. double click in the left panel 2. in the graph 3. in the toolbar dropdown 4. in the command palette cmd/ctrl + shift + p.
  8. Organize branches into folders in the left panel by naming them with a slash between the folder and branch name.
  9. With the left panel collapsed, switch repos or branches quickly from the toolbar, the fuzzy finder cmd/ctrl + p or the command palette cmd/ctrl + shift + p
Categories: Companies

Learning Git with GitKraken

Thu, 02/02/2017 - 03:09

I’ve been with Axosoft for almost two years now, and when I started, GitKraken, the company’s Git GUI, was so new it was still in private beta. Working for the marketing team, primarily on web projects, I needed to work collaboratively and use Git on a daily basis.

I had worked with Git before, but prior to Axosoft, I was a web team of one, meaning I rarely, if ever, had to collaborate with other developers on projects. As such, the extent of my Git knowledge was git status, git commit, and, when feeling saucy:

git commit -a -m 'look at me condensing my actions into one command like a big boy.'

It’s timely that as I write this, I’ve just finished reading a blog article by Avdi Grimm (that references GitKraken, as it happens), in which he makes a point I had never really considered:

One of the difficult, and at times disheartening lessons I’ve learned over the years is that there is a fine line in software between skills that actually increase your leverage, versus the ones which just make you feel smarter.Avdi Grimm, Having the appearance of good design

Git from the command line, for me, achieves the latter; when using the CLI for Git, I could perform simple commands that made me feel like I was doing something powerful, and maybe I was doing something powerful, but the truth is, I didn’t really know what I was doing. I understood some basics, but I did not, at all, have a sound conceptual grasp of anything outside of those simple commands. Reading up on Git piqued my interest enough to dive further in, but I hit a roadblock, and it started to feel unlearnable.

When I started with Axosoft, we were asked to use GitKraken because a) Axosoft believes in the product and in how strongly it performs (and did even in those early stages of the app’s development); and b) Axosoft wanted devs across the company to put the app through its paces and identify bugs, UX issues, etc.

So, I used GitKraken, and I used Git—truly collaboratively—for the first time. And I started to not only get used to performing tasks quickly, but to actually start making sense of how those tasks were working. Processes were simpler, I was far more productive, and I finally had a visual representation of Git that I felt I could understand.

Merging vs Rebasing

A good example of this, and one of my most satisfying ‘ah-ha!’ moments, is with merging and rebasing. Merging is a pretty straightforward concept to understand: you take a branch, merge into another branch, and that target branch now has the changes of both. What I didn’t understand until I could actually see the process, was that this is facilitated by a merge commit. To understand why this is useful in a collaborative environment, it’s probably best to explain with an example.

In the example setup below, I have a branch and I have master. This setup exemplifies a common situation: I have branched off master, made some changes, but have not finished working on the branch. Meanwhile, master has changed, and those changes are ones I’d find useful to have in my branch.

I have two options: I can merge master into branch-from-master, or I can rebase branch-from-master onto master. The former is entirely non-destructive and leaves a footprint of the process:

However, it’s easy to see how keeping things clean could become difficult when applying this method frequently, while lots of updates are happening around you. In order to avoid this potential conceptual spaghetti of merge commits, a friend recommended I rebase instead.

Whoa! I can actually see the difference, and it makes sense! The changes in master have been slotted into branch-from-master, as if my changes in that branch, and in master, were conducted on my one branch. master still has its commits intact, but it’s as if those commits were conducted on both branches at the same time.

Although this loses the footprint of merging, it keeps everyone’s repos looking clean, with histories that are easier to traverse and interpret. We have literally rewritten the commit history.

This is why, when it’s time to push my branch, it tells me I’m behind the remote. I could see how I had rewritten the history of that branch, so I could understand why a force push to my remote was acceptable under these circumstances. I want to reflect the history revision there, too, so I have to get just a little destructive. However, I can now also understand why there is the Golden Rule of Rebasing.

Using GitKraken has provided me with a visual way to learn some Git fundamentals that have made me more competent and confident with using Git collaboratively. Using a GUI for Git has allowed me to take the step from knowing how and when to do something, to knowing why and what it’s actually doing.

Categories: Companies

Axosoft Donates GitKraken Pro Revenues to Support ACLU

Wed, 02/01/2017 - 17:30

As an immigrant from Iran, and an American citizen who has lived in the U.S. for more than 33 years, I was disheartened to see President Trump’s executive order to ban certain immigrants from entering the country; especially those who have legally obtained Visas or legally gained permanent residency (although they later reversed this decision).

I believe that America’s greatness comes from its diversity and the power of individual citizens to speak up without fear of persecution. At Axosoft, we embrace diversity. We don’t run from it. We think it’s a fundamental key to success, which is a point I made sure to reiterate in an all employee letter.

Because diversity is foundational to who we are and the culture we’ve created at Axosoft, we knew we had to do something in light of the injustice caused by the President’s executive order. We also knew we couldn’t be the only ones who wanted to fight back.

That’s how we found the American Civil Liberties Union (ACLU), who has already stepped up and is fighting to correct this wrong. After researching more about the ACLU, I learned that they have been defending and preserving the rights and liberties of Americans for nearly 100 years. During this time when our rights are frequently being challenged, I was relieved to find this organization.

GitKraken Donating to ACLU Tweet this!

So, to show our support, Axosoft will be donating 100% of GitKraken Pro revenues to the ACLU, for the next 3 days (from Wednesday, February 1st, to Friday, February 3rd). Whether you are buying 1 GitKraken Pro license or 100 licenses, the revenues will go directly to the ACLU. You don’t need to do anything special to make this happen.

We will post updates about the progress on our Twitter account in the coming days.

Read this follow-up article to find out how much we donated to the ACLU!
Categories: Companies

GitFlow

Tue, 01/31/2017 - 15:44

At Syncfusion, we’ve been developing controls and frameworks for software developers since 2001. Over time, as our product line has expanded—emerging from our first grid control to more than 800 different controls across a variety of platforms—our release management process has become increasingly complex. Fortunately, Git came along and made everything easier.

Git is an open source distributed version control system that is flexible and easy to use for all kinds of teams, no matter how big or small. To adopt Git in everyday development, a model called GitFlow was introduced by Vincent Driessen to help simplify development and release management. This article assumes that you have some prior knowledge of Git and its basic terminologies. It aims to further describe Vincent Driessen’s branching model and how his GitFlow extension can be useful in a release management workflow for enterprises.

You can also check out this video, which explains how GitFlow works in GitKraken:

Workflow Model

GitFlow utilizes the core feature of Git, which is the power of branches. In this model, a repository has two main branches:

  1. Master—This is a highly stable branch that is always production-ready and contains the last release version of source code in production.
  2. Develop—Derived from the master branch, the development branch serves as a branch for integrating different features planned for an upcoming release. This branch may or may not be as stable as the master branch. It is where developers collaborate and merge feature branches.
Note: The previous two branches are the starting points for any project. They are very important and should be protected against accidental deletion until the project is better defined. Only authorized leads or project owners should be given the responsibility to merge changes from other branches—such as the feature branch, which we’ll discuss later—to the develop or master branches.

Apart from those two primary branches, there are other branches in the workflow:

  1. Feature—This derives from the develop branch and is used to develop features.
  2. Release—This also derives from develop branch but is used during releases.
  3. Hotfix—This derives from the master branch and is used to fix a bug in the production branch that was identified after a release.
gitflow diagram Diagram Author: Vincent Driessen | Original blog post | License: Creative Commons BY-SA

We will discuss these branches in detail along with the GitFlow extension used to simplify the management of these branches. The commands we use for the GitFlow extension are based on the Windows environment, but other platforms have similar commands. You can check out the GitFlow wiki for complete details regarding supported commands.

Installing a GitFlow Extension

The following simplified steps will get you up and running on Windows, although GitHub also hosts installation instructions for different platforms.

  1. Download and install Git for Windows. By default, it will install in this directory: C:\Program Files\Git.
  2. Next, you need to retrieve three files: exe from the util-linux package, libintl3.dll, and libiconv2.dll from the dependencies packages (libintl and libiconv). (For ease of installation, we gathered and uploaded all these files to http://www.syncfusion.com/downloads/support/directtrac/general/ze/dependencies142480694.zip.)
  3. Once you have those three files, copy and paste them to the location where Git is installed in your system (i.e. inside a bin folder at C:\Program Files\Git\bin). Git bin folder
  4. Next, clone or download this repository: https://github.com/nvie/gitflow.
  5. When done, navigate to the folder named “contrib” (gitflow-develop\contrib).
  6. Open the command prompt in that directory in administration mode and type this command: msysgit-install.cmd "C:\Program Files\Git". 
msysgit-install.cmd
  1. GitFlow will be installed and configured in your system and ready to use. You can test it by typing git flow help in the command prompt.
Note: In the next discussion, we will use a sample GitHub repository and a GitFlow extension to demonstrate branches in a workflow. Setting up GitFlow in your repository

When starting a project, you won’t have any code files. No problem, just create a Git repository with an empty directory. When finished, you can clone your repository in your system. In this example, we are using a sample GitHub repository, but the procedure applies for any Git repository.

  1. Clone the branch in your system using the Windows command prompt:
git clone https://github.com/bharatdwarkani/gitflow-example.git
  1. Switch to the following directory:
cd gitflow-example
  1. Initialize GitFlow in this repository:
git flow init

You will receive a message stating that no branches exist and prompting you to use common branch names. If you don’t want to change the default branch names, press enter to proceed. When finished, you will have a GitFlow extension initialized in your repository.

Note: This process has to be done by every developer for any repository they clone in a system. It is not limited to new repositories; it can be used for existing repositories too. Master and develop branches

The master and develop branches form the base of any repository in Git. The master branch contains a version of the code that is in production, and the develop branch contains a version that is due to be released in an upcoming version. Execute the following commands in the command prompt to check out the master branch in your system.

git checkout master
git push -u origin master

You will be prompted for username and password; enter them to proceed. Next, you will need to push the develop branch to a remote repository (i.e. from your system to sync with GitHub). Since the develop branch is only on your local machine, it has to be moved to a remote repository by executing the following commands.

git checkout develop
git push origin develop

Now you have a repository containing master and develop branches copied from your local machine. This is required only when you first start a project from scratch; otherwise, you could work with one of the following branches.

Feature branch

The feature branch splits from the develop branch and merges back to the develop branch after a feature is complete. The conventional naming of this branch starts with feature/*. This branch is mostly created and used by developers collaborating with teams. The purpose of the feature branch is to develop small modules of a feature in a project.

You might wonder why developers can’t work directly from the develop branch. Why do they need to branch off to a feature branch? To explain this, consider a scenario where you are developing a feature and management decides to drop that feature, as it is no longer required or there is less feasibility of implementing it.

At that time, if you are working in the develop branch directly, it would create a lot of conflicts and possibly break the existing code. Also, to do this you would need to manually delete or comment out code.

Instead, if you branched off a separate feature branch, you could silently discard and delete that branch without affecting the develop branch. Not only does this help develop features, which require the trial-and-error technique, but by using a separate branch you also get an extra level of stability in the develop branch because code from the feature branch undergoes several levels of code reviews and quality assessment before merging into the develop branch.

The lifetime of a feature branch ends once it merges with the develop branch. If multiple developers or teams are working on the same feature, it’s easier for them to collaborate by working on a common feature branch.

The following steps show how a feature branch can be created and published using the GitFlow extension from a Windows command prompt.

  1. To clone a repository:
git clone https://github.com/bharatdwarkani/gitflow-example.git
cd gitflow-example
git checkout develop
git flow init
  1. To start a feature branch (the name of the feature branch will be the name of the feature; we are using feature1 in this example).
git flow feature start feature1

After execution, the feature1 branch is created, but it exists only on your system and will not be available in the remote GitHub repository. Now you can continue with your development, adding files and modifying the code. When you’re done with the feature, you can commit it to your local system and later push it to the remote repository.

  1. Once done, the status of the changes can be checked for newly added or modified files.
git status
git add .
git commit -am "Your message"
  1. The following commands publish the feature to the remote repository.
git flow publish feature1
git push

If you check in the remote repository, a branch with the name feature/feature1 will be created.

Note: In the command prompt, the name of the branch you use is feature1, but GitFlow adds a naming prefix automatically (feature/branch) as a convention. When specifying a branch name in Git commands, you need to use the full branch name (feature/feature1), but in GitFlow commands the general prefix (feature/) need not be specified.
  1. Once a feature is complete and the code has been reviewed, you can complete your work in a branch by issuing the command below. Upon execution, the code will be merged to the development branch automatically and the feature branch will be deleted from the remote repository.
git flow finish feature1
  1. If you need to delete a branch, you can execute: git branch -d feature/feature1
Note: If multiple developers are coordinating on a feature, they need to follow the previous steps for cloning, with one caveat: One of the developers has to create and publish a feature branch, which might be empty, so that the others can work collaboratively. If a new developer needs to work, he or she can follow the same process by modifying the following command.

git flow feature track feature1 instead of git flow feature start feature1

Apart from this, there is one more branch called bugfix. It has a workflow similar to the feature branch, but it is used to fix a bug.  

Release branch

The release branch derives from the develop branch and merges back into the develop and master branches after completion of a release. By convention, the naming of this branch starts with release/*. This branch is created and used when features are completed and finalized for a versioned release.

Why can’t we directly release from the develop branch? Because the sole purpose of the release branch is to isolate a version of a release that is final but needs some quality assistance and stability from the upcoming version. If we branch off from the release branch, then other developers who are assigned to develop features for an upcoming release and are not involved in the release stability process can continue to development and merge their features into the develop branch without waiting on or affecting the current release process. The release branch helps isolate the development of an upcoming version and the current release.

The release branch’s lifetime ends when a particular version of a project is released. Once this branch merges into the develop and master branches, it can be deleted. And once you have done this, you can tag a master branch with a particular release version—let’s say v1.0—to create a historical milestone.

The following example explains how a release branch can be created and published using the GitFlow extension from the command prompt.

  1. Start a release branch.
git checkout develop
git pull
git flow release start release1
  1. Commit newly added or modified changes and push to the remote repository.
git add .
git commit -am "Your message"
git flow publish release1
git push
  1. Merge changes to the develop branch.
git checkout develop
git merge release/release1
  1. After a release, merge changes to the master branch.
git checkout release/release1
git pull
git flow release finish release1

-or-

git flow release finish -m "Your message" "release1"
git checkout master
git push --all origin
Hotfix branch

The hotfix branch is derived from the master branch and merged back after completion to the develop and master branches. By convention, the name of this branch starts with hotfix/*. This branch is created and used after a particular version of product is released to provide critical bug fixes for the production version.

The reason we do this is because one problem you might face when branching off from the develop branch is that some of your developers would have already started work for the upcoming release while you are in the middle of the current release. Your release would contain the next version of features, which are not finalized, but you only need to provide bug fixes for the current version. Instead of branching off from develop branch, you can branch off from the master branch, as that branch contains only the current version of the code in production. This way, branching off from the master branch will not affect your production or development version of the product.

The hotfix branch can be deleted once a critical fix for the current production version is released and merged with the master and development branches. Once you have done this, you can again tag the master branch with an iterative subversion of the release; let’s say v1.1.

This example shows how the hotfix1 branch can be created and published using the GitFlow extension from a command prompt.

  1. Start a new hotfix branch and commit changes after modifications.
git checkout develop
git flow hotfix start hotfix1
git status
git add .
git commit -am "Your message"
  1. Publish the branch to the remote repository.
  1. git flow publish hotfix1
    

    Merge changes to remote repository.

git flow hotfix finish hotfix1

-or-

git flow hotfix finish -m "Your message" "hotfix1"
git status
git checkout master
git push --all origin

Note: All commands starting with “git flow” are based on the GitFlow extension. Actual Git commands don’t have flow keywords in them. They start only with “git.”

Summary

The GitFlow model helps manage and organize a release better by using GitFlow extensions. Thank you, Vincent Driessen, for proposing GitFlow and for providing an extension that helps simplify the management workflow of enterprise-level releases.

Mastering the full functionality of Git takes time, so you’ll probably benefit from books like Git Succinctly and GitHub Succinctly. Both are part of Syncfusion’s Succinctly series of e-books—an acclaimed library of short technology books designed to orient you quickly with new technologies. The series is a great resource for developers, numbering more than 100 titles—all completely free.

If you choose to fully embrace the tenants of GitFlow order, know that you can use them with Axosoft’s GitKraken, a cross-platform Git GUI built to help put Git into human terms.

Categories: Companies