A few of our colleagues attended the Hyderabad edition of the ‘Oracle Code’ Conference in April. Tejesh & Abhilash share some useful learnings from the conference.


Talk 1 – The art of simplicity

Venkat Subramaniam shared his experiences of programming in the talk, The Art of Simplicity. The talk focused on code and programming style.

Simple is not necessarily familiar

Developers often get confused between the word familiar and simple. The developer sees the below piece of code and says it’s a simple for-loop.

But the developer does think for a moment whether to put < arr.length or <= arr.length and s/he does think about this every single time. On top of that, input array is mutated causing side effects. This is an example of familiar but not simple.

The below declarative style solution is unfamiliar but simple. No mutation and less thinking.

In Object Oriented programming, we encapsulate the moving parts. In functional programming, we eliminate moving parts.

Developers when starting on a new project think of design architecture that will scale in future. While that is true, many a time we don’t know what that scale is. It is better to not abuse the word vision and do what is required now, else the product might end up like this.

Image credit: Copyright of TM Rube Goldberg Inc.

Simple is not terse.

Developers confuse the words concise with terse. Concise code is short, easy to understand and work with. Terse code is short but hurts us when we least expect. The most important part of a code base, from readability point of view, is to separate code with blank lines.

Talk 2 – Productivity tips for developers

Sebastian Daschner’s talk focused on productivity tips for developers.

  1. Throw your mouse: try to spend most of the time on keyboard and rely on native keyboard shortcuts.
  2. Embrace keyboard shortcuts.
    • Try shortcuts for all applications that you use (ex: IntelliJ, Sublime Text, VSCode, Excel etc.)
    • Try to memorize keyboard shortcuts
    • If you are moving to a new editor always look for key bindings
  3. Command line and the power of linux
    • Always use command line over GUI
    • bash is more used but zsh has more features than bash
  4. Use shell alias for shortcuts
    • One can see the statistics of the command history for commands that are often used. Also, for the commands which are longer to type one can create alias names for them (examples).
  5. Embrace automation: use shell scripts to automate (ex: enter directory, perform file transfer, exit directory etc.), rely on bash to stitch scripts together, enable continuous integration for production code and write test cases. Rely on important keyboard keys (F and J keys have identifiers on all keyboards) and navigate through the rest.
  6. Manage distractions: mute your phone and turn off notifications, ensure a distraction-free work environment. For some, this means working in groups; for some, this means working alone in a conference room; for others it can be working from a cafe. Find your environment.
  7. Keep a to-do list: keep it short and one for each day.
  8. Step back and reflect: to automate the tasks that you are performing frequently.
  9. Read and write documentation: many developers ignore reading documentation and rely on Stack Overflow. While Stack Overflow offers single-point solutions, using official documentation helps understand a topic comprehensively.
  10. Relax: use time created from all the automation to relax and take regular breaks.

 

Please let us know what you think