• Skip to main content
  • Skip to footer

InRhythm

Your partners in accelerated digital transformation

  • Who We Are
  • Our Work
  • Our Culture
  • Events
  • Testimonials
  • Blog
  • Contact Us

tools

Mar 23 2016

Why Functional Programming needs to be at the top of your list in 2016

Every month there seems to be a new set of tools that the software community is raving about. Whether it’s a new framework, build tool, or obscure language, there always some new fad to learn.

When first introduced to the concept of functional programming, I assumed it would fall somewhere in that “fad” category. A topic I would read a short article about and then move on.

But, with just a few implementations of its concepts many of the issues that had plagued me for years seemed to be less of a concern. When I stuck with functional concepts, I no longer had to deal with monolithic objects that seemed to only grow in size and monstrosity.

With pure functions, unforeseen behavior or spooky side effects, from a distance, were less of a concern. It was as if a light had gone off and I could finally see clearly how much faster and stable I could build programs. If only the tools, community, and frameworks reflected this new paradigm.

Fortunately in the world of programming, especially front end development, we’re witnessing a subtle shift from Imperative to Declarative.

Before we dive into Functional and Object Oriented, it’s important to appreciate the bedrock of modern programming or Imperative and Declarative. For over thirty years we’ve approached programming from an Imperative style. We give a list of commands and tell the computer how we want to accomplish an action. Primarily based on the idea that you are constantly changing something in memory, mutability.

Imperative Thinking

Imperative is built around the idea that while you’re viewing or changing something in memory the rest of the world freezes. One can easily see how in a world filled with concurrency that could be a problem. By now I’m sure you’re wondering why would we ever revert to an Imperative style, but if you look at its predecessor with Procedural it becomes evident.

We’ll save Procedural for another piece, but the real question is – if Object Oriented is so touted why is it imperative?

Perhaps the most concerning idea that Object Oriented promotes is mutating state. It’s so frequent in Object Oriented languages that we simply take it as a necessity of programming. But state makes scaling apps extremely difficult as we have less certainty on values.

[snippet id=”86″]

Take this small example of a few lines of code. Because of mutating state and mutable objects we lose certainty of the value. By the time we console.log the value, it could be anything.

This only grows more concerning as we add other modules and objects. Object Oriented reliance on mutating state is concerning, to say the least.

Take that concept along with inheritance which promotes the idea of unforeseen interdependence – we frequently have code that is filled with uncertainty and hard to reason about.

The excuse that most apologist make for Object Oriented is that its objects serve as abstractions, or interfaces. But its more than just abstractions, OO promotes convoluted code.

The problem with object-oriented languages is they’ve got all this implicit environment that they carry around with them. You wanted a banana but what you got was a gorilla holding the banana and the entire jungle. — Joe Armstrong

The list goes on on from encapsulation to concurrency issues to polymorphism we could spend a week discussing the problems and only scratch the surface. But I’d rather focus on a “new” way to program. One grounded on the idea that rather telling the computer how to do something, emphasizing what we want.

The important idea to take away is that Imperative is based on a false premise. It assumes that you are the only one trying to interact with a value and that mutating data is a good approach to scaling an app.

The Way Forward

This idea of emphasizing what we want instead of how we want it done is the cornerstone of Declarative Programming.

At it’s best functional programming is declarative programming. It emphasizes small functions that composed together to give the computer what output we want from a certain input value. Think of it as functions mapping values.

[snippet id=”87″]

If you notice in this first example we’re telling the computer how we want to accomplish a task. Whereas in the second example, we emphasize the verbs or action we want to do. But before we dive further into the future lets take a look back.

Looking Back

To truly understand the paradigm shift that functional programming presents we have to think back to just what was capable seven to ten years ago. From a cutting edge company, we could expect a site to look and feel something like this.

QJd1tNY

We might laugh now, as we should, but the reason it lacks so much is that we simply didn’t have the necessary tools to create our vision.

What we create is directly proportional to the ability of our tools. If in the next ten to twenty years we want to accomplish the goals of virtual reality, machine learning and even things like space travel, the tools we use must become far more efficient and reliable.

We’re already starting to see more functional aspects in OO design with promises, immutable objects and libraries like lodash and underscore. But we’re just at the beginning of a shift and now is the time to become more familiar and comfortable with the topic.

Functional programming is often overlooked because it appears complex, theoretical and dare I say mathematical. Yet in fact its completely approachable. I’ve put together a guide detailing how one can become quickly fluent in functional programming. All you need is a basic understanding of front-end development and JavaScript.

But before you even dive into the guide, I’d suggest to get started thinking functionally by taking a small piece of code and answering two questions about it.

  1. What is the lifecycle of this object?
  2. What other variables or objects outside of this object are dependent upon it?

—

This is the first piece in a series The Functional Programmer’s Starter Kit and was written by contributing writer – Garreth Dottin.

Written by inrhythmAdmin · Categorized: Software Engineering · Tagged: functional programming, guide, JavaScript, software, tools

Feb 09 2016

How Lean Coffee can Transform any Disorganized Meeting

Large brainstorming sessions can be frustrating for managers and employees alike. They can be loud and overwhelming and ultimately lead to no productive outcome. We have an interesting solution for a new way to organize these meetings while ensuring that every voice is still heard. Try using the Lean Coffee approach!

Lean Coffee is a breeze to set up. All that you need to get started is a whiteboard, post it notes, pens, and your thumbs! On a whiteboard, create three columns – To Discuss, Discussing, and Discussed. Take 2-3 minutes while all attendees write down their top three ideas or discussion points, on separate notes. When finished, allow each participant to give a brief explanation of their topics. Topics are voted on using thumbs to avoid extra noise and keep things moving along. Alternatively, you may use the dot system approach as described in our handout. Every topic which gets  a majority “thumbs” up vote is something that will be discussed. Those notes get posted under the “To Discuss” column. Choose the first topic, move it to the “Discussing” column and get talking! Each topic will receive 8 minutes of discussion time and we recommend using a talking token for assistance. When time is up attendees vote, thumbs again, on whether or not the topic is worth further discussion. Once one topic is completed, move the note to the “Discussed” column. Make sure to include a round-up of all outcomes when all discussions are completed.

At InRhythm we have used Lean coffee in our operations meetings and breakfast events with great success. We recommend trying it out for any sort of group discussion time. We would love to hear about your experience with Lean Coffee – leave a comment and feel free to make use of our handout.

Written and Designed by Ricki Steiner

Written by inrhythmAdmin · Categorized: Agile & Lean · Tagged: agile, Lean, meetings, orginization, tools

Aug 04 2015

A Sneak Peek of InRhythm’s NYC Meetup on Node.js

On July 15th the crowd gathered at IRHQ for a Meetup on Node.js. Our senior NY consultant guided everyone through an exercise using Node and then we transitioned to hands-on coding. During the workshop we built an SMS-driven customer service tool using PM2, Gulp, React, WebSockets, ES6 Map, LevelDB, Deploying to Heroku, BrowserSync, Twilio(SMS), and more. We gained a good sense of how to build realtime apps with Node.js, set up a live/responsive build process, and deploy to virtual servers for prototyping. There was a lot of discussion surrounding how Node can be applied to solve business problems. The night was a success and we are excited for many more Meetups to come! Take a look!

Written by inrhythmAdmin · Categorized: Events, Software Engineering · Tagged: education, Meetup, Node.js, React, sms, tools

Footer

Interested in learning more?
Connect with Us
InRhythm

140 Broadway
Suite 2270
New York, NY 10005

1 800 683 7813
get@inrhythm.com

Copyright © 2021 · InRhythm on Genesis Framework · WordPress · Log in

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Cookie settingsACCEPT
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.

Necessary Always Enabled

Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.

Non-necessary

Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.