Have you ever found yourself staring at photos of someone’s dog, cat, or kids, only to grind through a smile that’s not authentic? It’s a universal fact that we all think the things we do and produce are wonderful. The code we write is so witty! We’re like the fable of Jupiter and the Monkey; it doesn’t even matter if others scoff, we believe our creation is beautiful.
So how do we get objective with such a curse?! In what way can we protect ourselves from such bias? We could always ask our fellow developers, but is that effective? As fun as it sounds, even if you did, there’s no guarantee that they wouldn’t apply their own bias until your code reached some kind of median between the both of you.
These days web assets such as JS and CSS aren’t simple text files. Instead, they’re typically minified or come from a complex build process involving compiling or transpiling. For example, CSS can be generated from a SASS file. JS can be compiled from ES6 using Babel. These toolchains make working with assets easier for developers and make following best practices such as minification much easier. Yet, there’s a problem. What do we do when there’s an error? If there’s an exception in your JS and it’s minified, you will have short variable names which are all on one line and it’s impossible to see where the error comes from. Source maps seek to solve this problem.
What is a source map? At its core, a source map allows a browser to map the source of an asset to the final product. In our previous example of an error happening in a JS file, if the JS file had a source map, it would allow the browser to translate the location of the error to the original unmodified file on disk. Pretty cool.
Every time I talk to a recent grad I hear a variation of the phrase, “I know how to code, I can code in anything." This is, on the surface, true for some bits like boolean logic and loops. Where it starts to fail for me is when I need to leverage a language’s ecosystem. I’m a Ruby programmer at heart (for the last 10+ years), yet I’m being forced to write in other languages through my CS Masters classes at Georgia Tech. I know I’m a competent coder, but can I really "code in anything"? How much does skill in one language translate to another? First a story about not knowing a programming language. In 2012, I was working for Gowalla (THE major competitor to Foursquare). When the company went under, I started looking for a new job right away. I had two great phone interviews with another social networking company, whose name will be withheld for dramatic suspense. The team was small, but I talked to both founders and we hit it off.
This post is recommended for everyone from total beginners to people who literally created RSpec.
Starting a New Project
When you start a new Ruby project, it’s common to begin with:
There are many kinds of applications and many ways to manage how they behave or perform via configurations. Software is designed with default behavior built in, so some specific configuration is usually required before the software works (like a path to reach a dependency), or a default and possibly rudimentary implementation may run without it.
From system tools that can have a central configuration for system-wide settings to a local user configuration to perhaps a per project config, the layers of configuration and the means by which they are stored can vary greatly. The choices for how you implement a configuration object should depend on where and how it will be used.
If you’ve ever searched for a specific gem functionality, you’ve likely sorted through reviews, forum posts, and articles detailing the specifics of each gem before settling on what to use. Before that, maybe you searched for “authorization gems” or “data visualization gems” to find out which ones you want to research further. You can skip that step by starting from the Awesome Ruby instead. This Ruby on Rails resource lists hundreds of Rails gems by functionality, in alphabetical order. It’s essentially a Rails gem directory, saving you a little time whenever you need to find a new gem to use.
A DSL, or Domain Specific Language, is a language that has a specific purpose rather than a general purpose, like C or Java. One of the most popular DSLs is SQL because it’s the standard for querying a relational database and its syntax is specific to activities such as sorting, filtering, and displaying data.
SQL falls under the category of external DSLs, which means it requires its own parser and implementation of all of the necessary components. Other examples of external DSLs are Gherkin, for writing feature files, Make Files, for building C and C++ applications, and HTML, for declaring webpages).
I’ve been through a few programming languages over the years, and I can say without hesitation that Ruby is my favorite. Not the “best” (there is no “best” programming language), but my favorite. Here’s why: You can get the same…
The post Why Ruby is Awesome appeared first on Treehouse Blog.
Every Wednesday, new courses and workshops are added to the growing Treehouse Library! Read more about our new course Ruby Basics course and our two new workshops below. Also check out course coming later this month, and watch our weekly video update…
The post New Treehouse Course & Workshop Highlights appeared first on Treehouse Blog.
Dependency hell: If you’ve done any significant amount of programming or system administration, no matter which framework you used, you’ve been there — you’ve found yourself bogged down in cross-dependency and package configuration issues.
While a certain amount of dependency resolution is a fact of life for most developers, there are tools that can help to manage it. How you ask? This article discusses tools designed to mitigate dependency conflicts for Ruby programmers including ActiveRuby.