Jedi/Rockstar/Ninja in Development

How I'm learning to be a master coder

hide

Read Next

A good code puzzle platform (and bonus Python tips)

As mentioned, I wanted to quickly advance through Python practice problems and be able to see working solutions. The best method I was able to find is HackerRank. You can access previous contests, do coding and testing in many languages right in the browser, and then see others' code on the leaderboard, so it's great to see a variety of solutions and languages.

However, I'm starting to get diminishing returns from doing coding puzzles. Better to read a book on best practices, especially object oriented. Here are some more tidbits from today:

Pass by assignment. Every language seems to have a slightly different approach to passing parameters to a method. Python's is called pass by assignment. The best explanation I saw of this is that every assignment in Python is binding a name to an object. x = 1 means that x refers to the 1 object of type int. Every integer 1 is the same object. So here, when passing an integer, b is, within the function, being bound to a different object, 3, and a is not affected.

However when you pass a list, the list that a and b point to is being modified, . With this understanding, there's no need for concepts of pass-by-value, pass-by-reference, or mutable/immutable.

Automatic Generation of Cucumber from Code

On Imported Blog

(All of the code mentioned here exists, and we're using it. Our actual codebase is all in Perl - I've written out examples here in Javascript for clarity and so there's no copyright issues. The actual implementation code for all this is pretty simple and not very clever, so I'm not planing to jump through the hoops needed to actually release it unless there is some massive unexpected demand...)

Let's start with Gherkin. Gherkin is basically a constrained application of English meant for specifying test cases. For example, for a calculator you might write:

You then set up a number of step parsers that match the steps (called step definitions), and execute code based on it. eg:

Rendering New Theme...