What is the hardest thing about learning to code?

Eric Elliot asked a question in his tweet: What is the hardest thing about learning to code?. Excellent question. Like last time this time I also have collected all interesting answers from that tweet:

  • the terrible culture of judgement and name-calling that you find yourself thrust into
  • learning is fun. The hard part is to stay motivated after learning.
  • gaining the experience need to become a good developer and then naming and cache invalidation…
  • getting past your own problems. “I can’t figure this out” “everyone else is smarter”[……]

    Read more

Why I switched to only NodeJS + npm and stopped using Grunt

I can’t imagine building a modern JavaScript application or website without using any kind of build system. Recently I’ve used Grunt in several projects. There is also Gulp, Broccoli and probably many more.

I’ve asked myself if the building process can’t be done in a different way. Why do I need extra layer like Grunt? What would be the benefits of having build system created on your own? Why not just using NodeJS and npm packages? The think is that behind Grunt there are also the same packages as you’d use without Grunt.

The problem


Read more

Bower and import CSS file into Sass (using scss)

Recently I wanted to import just .css file into .scss directly. This is not available directly in scss. However, you can import it when you change the extension from .css to .scss. While this solves generally problem then working with Bower components it becomes little bit painful when you’d need copy and change the name every time you install/upgrade the package.

In my particular case I wanted to include normalize.css in my scss files and I didn’t want to do manually copy&rename every time I install/upgrade normalize.css from Bower. So, in[……]

Read more

How do I update each dependency in package.json to the latest version?

Recently I wanted to update each dependency in package.json to the latest version. I didn’t want to do that manually. After some research I found that npm package npm-check-updates (Find newer versions of dependencies than what your package.json or bower.json allows) comes in handy.

Here are the steps which I did:

$ npm install -g npm-check-updates
$ npm-check-updates -u
$ npm install

-u option means upgrade your package.json automatically. Here is the result of running npm-check-updates:

npm check update result


Thanks to Eric Elliot tweet[……]

Read more

Set windows environment variables with in batch script

There could be a situation where we want to add new path to the Path environment variable using batch script. Let’s say you have a directory build/commands and you want to add this path to the Windows Path environment variable.

windows environment path

Let’s then create small batch script setpath.bat which will do few things:

  • be able to execute with UAC privilege elevation
  • read the current directory path so that you don’t have to worry about specifying full path
  • add specified path to the end of PATH configuration
  • check, if at the end of PATH configur[……]

    Read more

Most common mistake software developers make

Eric Elliot sent a tweet with a question: What do you think is the biggest / most common mistake software developers make?. I think it’s worth it to collect them here into one list.

  • technology is not politically neutral
  • underestimating the time something will take
  • deferring technical debt
  • “copy & paste”
  • coming up with patterns, just for the sake of patterns; solving real life problems is what they should do
  • chronically adopting new tools and frameworks, and leaving no time to learn or embrace the fundamentals
  • not testing
  • dev[……]

    Read more

setup-defender.ps1 is not digitally signed while using ember-cli-windows-addon

So, I started playing with EmberJS framework. However, build times on Windows are longer than on Linux or Mac OS X. Much of that penalty is not because of node or ember-cli, but because of Windows services monitoring filesystem. So, I have installed npm package npm install --save-dev ember-cli-windows-addon in order to configure Windows to work effectively with Ember build. Then, to start the automatic configuration, I run ember windows and got error message:

Configuration Error: File C:\Sources\ember\node_modules\ember-cli-windows-addon\no[……]

Read more

Sass and import directives may not be used within control directives or mixins

Currently I am using both Grunt tasks grunt-sass and grunt-contrib-sass to compile sass (strictly scss). The first one is faster than second one, but second one generating source maps that just works. Unfortunately grunt-sass source maps somehow doesn’t work properly and browsers can’t use them.

I got an error message today and I’d like to share simple solution to that. The scss code more or less looks like:

@include example() {
@import 'part1';
@import 'part2';

Above code is compiled fine using grunt-sass, but grunt[......]

Read more