<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Stan James</title>
    <description>The latest articles on DEV Community by Stan James (@wanderingstan).</description>
    <link>https://dev.to/wanderingstan</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F300213%2Ff31f5678-8ea9-47db-b1c8-60d10a4f725e.jpeg</url>
      <title>DEV Community: Stan James</title>
      <link>https://dev.to/wanderingstan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/wanderingstan"/>
    <language>en</language>
    <item>
      <title>The evolution of developer experience in the 20th century</title>
      <dc:creator>Stan James</dc:creator>
      <pubDate>Wed, 05 Feb 2020 00:16:49 +0000</pubDate>
      <link>https://dev.to/wanderingstan/the-evolution-of-developer-experience-in-the-20th-century-1kbc</link>
      <guid>https://dev.to/wanderingstan/the-evolution-of-developer-experience-in-the-20th-century-1kbc</guid>
      <description>&lt;p&gt;A marketing friend once looked at my screen while I was coding and remarked, “That’s so scary looking!” This got me thinking about how we got to this strange-looking multi-colored-words-on-black aesthetic. So here’s a brief history of the developer experience.&lt;/p&gt;

&lt;h1&gt;
  
  
  Origins
&lt;/h1&gt;

&lt;p&gt;Ada Lovelace is credited with writing the first computer program in 1842. As there were no actual computers, the program never actually got to be run. But it’s fascinating to see how she represented the algorithm on paper, having no precedent to work from. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--N74gUZmS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wanderingstan.com/wp-content/uploads/2019/11/Diagram_for_the_computation_of_Bernoulli_numbers-1024x717.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--N74gUZmS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wanderingstan.com/wp-content/uploads/2019/11/Diagram_for_the_computation_of_Bernoulli_numbers-1024x717.jpg" alt="Alt text of image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The program is for the Charles Babbage’s Analytical Engine to compute Bernoulli numbers, which are important in number theory.&lt;/p&gt;

&lt;h1&gt;
  
  
  Wires and literal bugs (1940s)
&lt;/h1&gt;

&lt;p&gt;The very first computers were built in the 1940’s and were programmed by literally connecting wires, turning dials and flipping switches. “Programming” was a special case of “wiring.” There was no effort to make programming easier for humans. It was enough that these machines could exist at all!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KtBMyaY9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wanderingstan.com/wp-content/uploads/2020/02/MzI1ODQzNg.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KtBMyaY9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wanderingstan.com/wp-content/uploads/2020/02/MzI1ODQzNg.jpeg" alt="Programming the ENIAC Computer."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This era also brought us the concept of a program “bug.” The first one being a literal moth that shorted out a relay. Grace Hopper recorded this occurange, along with the moth, in her log book.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jprXxp18--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wanderingstan.com/wp-content/uploads/2020/02/H96566k.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jprXxp18--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wanderingstan.com/wp-content/uploads/2020/02/H96566k.jpg" alt="First software bug"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Assembly Language (1950s)
&lt;/h1&gt;

&lt;p&gt;The first step toward a human affordance was assembly language, which allowed programmers to use human-sounding commands like “ADD” or “JUMP” instead of remembering numeric codes like “523” or “10011011”. But this was just a thin gloss, so the programmer still had to know the computer’s architecture inside and out.&lt;/p&gt;

&lt;p&gt;The code for the Apollo Space Missions is a good example of assembly language, even though it was written in the 1960s. Here is a printout of part of that program, interestingly named kissing!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JmITRVON--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wanderingstan.com/wp-content/uploads/2019/11/Apollo-luminary099-0730.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JmITRVON--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wanderingstan.com/wp-content/uploads/2019/11/Apollo-luminary099-0730.jpg" alt="Code From Apollo computer"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;INTRPVP         STQ     BOFF            # PRECISION UPDATE PASSIVE VEHICLE
                        RTRN            #       TDEC1
                        AVFLAG
                        OTHERV
                CALL
                        CSMPREC
                GOTO
                        RTRN
OTHERV          CALL
                        LEMPREC
                GOTO
                        RTRN
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h1&gt;
  
  
  Punch cards and high level languages (1950s)
&lt;/h1&gt;

&lt;p&gt;Languages like Fortran and COBOL used quasi-English function names like “if”, “not”, and “while”, and could be run on different computers as long as there was a suitable compiler. &lt;/p&gt;

&lt;p&gt;These first generation “high level” languages were all written in the same way: on punched cards. Each card corresponds to one line of code, usually 80 characters across.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--E8xms8BX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wanderingstan.com/wp-content/uploads/2019/11/Punch-card-cobol.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--E8xms8BX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wanderingstan.com/wp-content/uploads/2019/11/Punch-card-cobol.jpg" alt="Punchcard"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The human-readable code is at the top of the card and reads:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;IF MOD-G-JAHR NOT NUMERIC MOVE ZERO TO MOD-G-JAHR.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;A program consisted of a deck of cards. Editing a program consisted of punching new cards, or re-ordering the deck.&lt;/p&gt;

&lt;p&gt;As shown in the photo below, “comments” would be written on the edge of this deck indicating subroutines. The red angled line was used as a crude method to get the cards back in order if the deck were to be dropped. You can also see old red marks revealing sections that had been re-ordered.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XKa28Xrc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wanderingstan.com/wp-content/uploads/2019/11/Punched_card_program_deck.agr_-1024x780.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XKa28Xrc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wanderingstan.com/wp-content/uploads/2019/11/Punched_card_program_deck.agr_-1024x780.jpg" alt="A single program deck, with individual subroutines marked. The markings show the effects of editing, as cards are replaced or reordered."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Unlike in modern languages, there was no indentation of lines to represent blocks. Indentation makes no sense in a world where you see only one line at a time! Fortran instead used indentation to distinguish comments (column 1), labels (columns 2-5), and statements (columns 7 and beyond).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;C AREA OF A TRIANGLE - HERON'S FORMULA
C INPUT - CARD READER UNIT 5, INTEGER INPUT
C OUTPUT -
C INTEGER VARIABLES START WITH I,J,K,L,M OR N
      READ(5,501) IA,IB,IC
  501 FORMAT(3I5)
      IF(IA.EQ.0 .OR. IB.EQ.0 .OR. IC.EQ.0) STOP 1
      S = (IA + IB + IC) / 2.0
      AREA = SQRT( S * (S - IA) * (S - IB) * (S - IC) )
      WRITE(6,601) IA,IB,IC,AREA
  601 FORMAT(4H A= ,I5,5H  B= ,I5,5H  C= ,I5,8H  AREA= ,F10.2,
     $13H SQUARE UNITS)
      STOP
      END
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h1&gt;
  
  
  REPL and line numbers (1960s)
&lt;/h1&gt;

&lt;p&gt;The BASIC computer language was designed to be even easier to use. It was developed in parallel with time-sharing, which allowed many users to interact with a single computer via teletype without needing to punch cards and load them. For the first time, users could now write, edit, and run programs directly in computer memory! This was the first REPL, “read–eval–print loop”.&lt;/p&gt;

&lt;p&gt;The standards and protocols developed for this live on as “TTY”, still used in developer terminals to this day.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PX9WKqtV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://wanderingstan.com/wp-content/uploads/2019/11/teletype2.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PX9WKqtV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://wanderingstan.com/wp-content/uploads/2019/11/teletype2.gif" alt="Teletype Code"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the image above, note the innovation of line numbers. Compared to manually sorting punch cards, this must have seemed like a great innovation!&lt;/p&gt;

&lt;p&gt;This example from the 1968 manual averages the numbers that are input:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;5 LET S = 0
10 MAT INPUT V 
20 LET N = NUM 
30 IF N = 0 THEN 99 
40 FOR I = 1 TO N 
45 LET S = S + V(I) 
50 NEXT I 
60 PRINT S/N 
70 GO TO 5 
99 END
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h1&gt;
  
  
  Visual editing (1970s)
&lt;/h1&gt;

&lt;p&gt;The advent of cheap CRTs meant that developers stop wasting paper and write their programs on a screen. Code editors vi and emacs were created, beginning the long developer tradition of arguing over the best editor. (vim, still popular today, is an updated version of vi written in the 1990s.)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DokoL3Lf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wanderingstan.com/wp-content/uploads/2019/11/Vi_source_code_join_line_logic.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DokoL3Lf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wanderingstan.com/wp-content/uploads/2019/11/Vi_source_code_join_line_logic.png" alt="vi editor showing C program on a CRT terminal. Wikipedia"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;New languages like C took advantage of this by introducing indentation. In the image above, the lines after join(int c) are intended, to show that they are within the scope of the function. The lines after the for(a1…) command are likewise further intended. This use of visual space to denote semantic meaning was a real innovation, and a true affordance to the way human vision can spot visual alignment.&lt;/p&gt;

&lt;p&gt;This innovation also kicked off the unending “religious wars” of tabs-vs-spaces, 2-4-8 space intending, and “which line gets the brace?”&lt;/p&gt;

&lt;h1&gt;
  
  
  Syntax highlighting, auto-formatting and visual debugging  (1980s)
&lt;/h1&gt;

&lt;p&gt;Mac Pascal was the first editor to check for syntax errors while you were editing, not waiting until you compiled the program.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--slUZinDD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wanderingstan.com/wp-content/uploads/2020/02/MacPascalError.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--slUZinDD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wanderingstan.com/wp-content/uploads/2020/02/MacPascalError.jpg" alt="Syntax"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It also was the first editor to do syntax highlighting and auto-formatting. Because the original Mac could not show colors, highlighting was done with bold and italic.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ESUmZBpi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://wanderingstan.com/wp-content/uploads/2019/11/macpascal-indent-hilight.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ESUmZBpi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://wanderingstan.com/wp-content/uploads/2019/11/macpascal-indent-hilight.gif" alt="Video of Mac Pascal showing syntax highlighting and auto-indenting."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A few years later, the company behind Mac Pascal gave the world its first visual debugger. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--U2Ku6afB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wanderingstan.com/wp-content/uploads/2020/02/v4LightsBug.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--U2Ku6afB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wanderingstan.com/wp-content/uploads/2020/02/v4LightsBug.jpg" alt="Debugger"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Interface builder, view source, and search (1990s)
&lt;/h1&gt;

&lt;p&gt;After being kicked out of Apple, Steve Job’s founded NeXT computers. The NeXTStep operating system was groundbreaking for developers in that it separated interface development from code-writing. You could now add a button to a window by merely dragging it from a palette, rather than writing lines of code. This program was called Interface Builder, which lives on today in Apple’s XCode, used to create all iOS apps.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XNW3sP0x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wanderingstan.com/wp-content/uploads/2020/02/ns09ibsm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XNW3sP0x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wanderingstan.com/wp-content/uploads/2020/02/ns09ibsm.png" alt="NeXT Interface Builder"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The twentieth century ended with the advent of the web. This was set to revolutionize developer experience again.&lt;/p&gt;

&lt;p&gt;The web browser democratized developer learning with “View Source”: Anyone curious how a web page was coded could find out in an instant! Suddenly everyone had their own HTML and Javascript development environment, and every new web page was a new example to learn from!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uW3zF5LQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://wanderingstan.com/wp-content/uploads/2020/02/netscape-view-source.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uW3zF5LQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://wanderingstan.com/wp-content/uploads/2020/02/netscape-view-source.gif" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;1998 was the twilight of the century, and the year Google was founded. It would become the unsung cornerstone of developer experience up to today, as we copy-paste our error messages and “How do I quit vim?” into its search box. And that’s a topic for another post!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dPFQZ4z3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wanderingstan.com/wp-content/uploads/2020/02/image.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dPFQZ4z3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://wanderingstan.com/wp-content/uploads/2020/02/image.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>codenewbie</category>
      <category>history</category>
      <category>vim</category>
      <category>editors</category>
    </item>
    <item>
      <title>Good code balances efficiency, readability, flexibility, and brevity</title>
      <dc:creator>Stan James</dc:creator>
      <pubDate>Mon, 20 Jan 2020 19:33:59 +0000</pubDate>
      <link>https://dev.to/wanderingstan/good-code-balances-efficiency-readability-flexibility-and-brevity-4e61</link>
      <guid>https://dev.to/wanderingstan/good-code-balances-efficiency-readability-flexibility-and-brevity-4e61</guid>
      <description>&lt;p&gt;&lt;em&gt;tl;dr: There are four goals you can prioritize when coding: efficiency, readability, flexibility, and brevity.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In English, we understand that “good writing” means something different between a novel, an airplane repair manual, a poem, and a tweet. But in writing computer code, sometimes we forget that there are similarly different goals that the code may be optimizing for.&lt;/p&gt;

&lt;p&gt;In project planning, interviews, and even in personal projects, it’s important to be crystal clear on goals, as compromises are inevitable. Not all code can be efficient, readable, flexible, and brief!&lt;/p&gt;

&lt;h1&gt;
  
  
  Efficiency
&lt;/h1&gt;

&lt;p&gt;Efficiency has traditionally been the assumed goal of all coding, and remains the primary yardstick for technical interviews. You try to minimize processor cycles, storage space, or network traffic. You analyze with Big O and employ profiling tools to verify. The need for efficiency is driven by the sheer amount of data to be processed (Big Data, training sets, etc) or by limited resources of mobile devices. In extreme cases, this can mean dropping down to assembly code or employing PhD level mathematical tricks.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Resources to be optimized&lt;/em&gt;: &lt;strong&gt;CPU, memory, network traffic&lt;/strong&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Readability
&lt;/h1&gt;

&lt;p&gt;Readability is more and more recognized as a worthy goal, even at the expense of efficiency. For example, what good is it if your nightly batch script runs five seconds faster if only a Super-senior Engineer can understand the code? Or if a single mistake could mean that an eight hour training run gets the wrong parameters passed?&lt;/p&gt;

&lt;p&gt;Readability also means choosing names and data structures that minimize possibly confusion. Recursive solutions are often elegant, but experienced engineers agree that generally iterative solutions are easier to understand.&lt;/p&gt;

&lt;p&gt;The rise of Open Source has brought readability into the spotlight. A project won’t attract new contributors if they can’t understand the code. Likewise, companies have learned that having a readable code is required if you want to attract people to your libraries. For example, the APIs and example programs for Google’s Tensorflow and Facebook’s GraphQL are clearly written.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Resources to be optimized&lt;/em&gt;: &lt;strong&gt;future developer time&lt;/strong&gt; (including yourself!), &lt;strong&gt;attractiveness to outside developers&lt;/strong&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Flexibility
&lt;/h1&gt;

&lt;p&gt;Flexibility is an under-appreciated goal in coding. When building a prototype or merely exploring an idea, one doesn’t care so much about efficiency or helping outsiders understand the code. Instead, one builds for uncertainty. For example, you don’t know yet if the project will use Tensorflow or OpenCV for counting the number of cats that walk by, so you create an interface that returns “numCats” and cleanly allow for different git branches to test out possible solutions.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Resource to be optimized&lt;/em&gt;: &lt;strong&gt;developer time, switching costs&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Flexibility is also the primary goal of explorer-style coding, covered in my previous post &lt;em&gt;&lt;a href="https://dev.to/wanderingstan/coding-styles-are-you-lewis-and-clark-or-building-an-interstate-95"&gt;Lewis and Clark Style Development&lt;/a&gt;&lt;/em&gt;. &lt;/p&gt;

&lt;h1&gt;
  
  
  Brevity
&lt;/h1&gt;

&lt;p&gt;Brevity is the final goal of coding. This is the case when you’re hashing out an algorithm with a co-worker in a Juypyter notebook, or doing a coding interview on a whiteboard. You and your co-worker will implicitly understand that the variable tsr means “total sheep remaining,” or that the first and second elements in each tuple will represent the left and right branches of a binary tree.&lt;/p&gt;

&lt;p&gt;In a classic technical whiteboard coding problem brevity becomes important, but the interviewee is presumably also being evaluated on effeciency and readabilty. If you’re being interviewed, it’s best to be very clear what tradeoffs you are making between these.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Resources to be optimized&lt;/em&gt;: &lt;strong&gt;whiteboard or screen space, handwriting time.&lt;/strong&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusions
&lt;/h1&gt;

&lt;p&gt;When writing code, one often comes to forks in the road. I’ve found that having clear priorities between efficiency, readability, flexibility, and brevity keep everyone on the same page, especially junior developer who don’t have as much cultural acclimation to intuitively understand different contexts.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>codequality</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>Coding styles: Are you Lewis and Clark or building an interstate?</title>
      <dc:creator>Stan James</dc:creator>
      <pubDate>Tue, 24 Dec 2019 15:59:50 +0000</pubDate>
      <link>https://dev.to/wanderingstan/coding-styles-are-you-lewis-and-clark-or-building-an-interstate-95</link>
      <guid>https://dev.to/wanderingstan/coding-styles-are-you-lewis-and-clark-or-building-an-interstate-95</guid>
      <description>&lt;p&gt;&lt;em&gt;tl;dr: Software projects exist on a continuum between the Lewis and Clark expedition, and laying down freeway. Knowing what kind of project you’re on can be the difference between success and failure.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In 1803 Thomas Jefferson commissioned the explorers Lewis and Clark set out to explore the American west, no one knew what they would find. The whole point of the venture was to figure out what was there. Gold? Farmlands? Trading partners? Rivers?&lt;/p&gt;

&lt;p&gt;On the other hand, when that stretch of highway near your house was built, the decision to build happened years ago by some planner, the road was built to last for many years, and development proceeded methodically and carefully, drawing upon centuries of road-building experience.&lt;/p&gt;

&lt;p&gt;Problems arise when the developers, managers, and product managers aren’t clear on what the mission is; employing the wrong techniques or wrong metrics of success. This shows up acutely between startups and large companies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Startups are typically &lt;em&gt;explorations&lt;/em&gt;.&lt;/strong&gt; The founders have an inkling that there is value to be found in some direction. The developers write code quickly to explore the space, knowing that almost all of it will get thrown away. You keep scaling and maintainability in mind, but the top priorities are (1) code works (2) that can be easily changed and (3) most importantly, provides some data answering the questions “Is this something anyone wants?” or “Can this be built at all?”&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Big companies are more like the highway crew.&lt;/strong&gt; The sources of value have been located, there is no doubt that the traffic will come once the on-ramp opens. The developers work within a large body of existing code, careful not to break anything. Scalability and maintainability are top-of-mind.&lt;/p&gt;

&lt;p&gt;Of course this is over-simplifying: both styles of mission exist within companies of any size. Big companies have innovation and R&amp;amp;D departments, classic Lewis and Clark explorations. And a startup that is preparing to take on their first big customer will want to be damn sure that their code can scale to handle the customer’s use!&lt;/p&gt;

&lt;p&gt;But some startups try to act like big companies from the very start, crippling themselves. With no validation that anyone wants the service, they build a system completely containerized, with a CDN, load balancer, de-normalized noSQL scalable database, GraphQL API, and everything written from the ground up in Node. The better solution might be as simple as a Django or WordPress installation with a just a dash of custom code. &lt;strong&gt;They’re laying down concrete and guardrails when they should be bushwacking to the top of the nearest hill.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I find that within the developer community there tends to be a fettishization of the “highway building skills.” Who wouldn’t want to believe that their code will need to process billions of transactions? Why wouldn’t you want to use the same techniques as Google or Amazon?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;But being a skilled explorer is just as important a skill, but harder to codify.&lt;/strong&gt; Knowing how to keep your code nimble. Knowing how build that demo that works just good enough that the investors put in money and keep the lights on. Knowing how to find that open-source project that is kinda sorta like your goal but can be hacked into shape.&lt;/p&gt;

&lt;p&gt;In short, there is a difference between bad code and exploratory code.&lt;/p&gt;

&lt;p&gt;Finally, it’s important to realize &lt;strong&gt;every highway owes its existence to some explorer&lt;/strong&gt;. Facebook began as some monolithic PHP code. Google began as student code from a PhD thesis. Slack began as a whipped-together internal tool of a game company. The beauty of exploring is never knowing what you’ll find!&lt;/p&gt;

</description>
      <category>codequality</category>
      <category>prototyping</category>
      <category>design</category>
    </item>
  </channel>
</rss>
