A good programmer is a lazy programmer (1 Viewer)

isladogs

MVP / VIP
Local time
Today, 04:20
Joined
Jan 14, 2017
Messages
18,207
I haven't read the link as its currently down but I think there is a lot of truth in the article synopsis shown.

Coincidentally my user title at another forum is as shown below
Capture.PNG

In my case, its actually a play on the initials for my VIP status at that forum.
Which perhaps begs the question as to what the CID part of my user title here stands for.

NOTE: NG is banned from answering as he has already worked it out after asking me via PM
 

Dreamweaver

Well-known member
Local time
Today, 04:20
Joined
Nov 28, 2005
Messages
2,466
Don't know about me being a good programmer but I'm defantly Lazy
I got feed up trying to import objects into a new db so I made a default system the one below if for a single user

2020-02-18.png
2020-02-18 (1).png
2020-02-18 (2).png
 
  • Like
Reactions: Jon

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Yesterday, 22:20
Joined
Feb 28, 2001
Messages
27,121
Guys, "constructively lazy" is a GOOD thing. When I was with the Navy we always heard them say "Work smarter, not harder."

When I was doing my most recent big project, I created forms that had no binding (and therefore no bound controls) but it had all sorts of event and command button infrastructure built in. I estimate that by basing everything on those "template" forms, I was able to save 40% of the work on nearly two dozen forms.

I used to be responsible for monitoring disk usage, but I put together monitoring programs that could do short, medium, and long-term linear regression as warnings that a given disk was either in trouble or WOULD be in trouble soon. That scripted disk monitor gave me warnings of as much as 30 days advance notice that a disk would be close to full. It's a long story as to WHY I had over 35 disks, but I did, and no, it wasn't a Windows system, but the concept was the same.

If you take the trouble to automate some of your drudgery, you get more time to do other things more carefully and more effectively.
 

NauticalGent

Ignore List Poster Boy
Local time
Yesterday, 23:20
Joined
Apr 27, 2015
Messages
6,316
I take some issue with this bit:
At this point, I will stop and state what should hopefully be obvious: The reverse is not true. A lazy programmer is rarely good. You know the person I’m talking about. Maybe they like to execute that query and stare at the screen for three minutes while it runs rather than opening up a new tab and working on a different piece of code.
That is me to a "T"...but it is because I am still relatively new to this and watching the "Magic" still fascinates me.
Knowing that I can make cool things happen, things that others say "Wow! You can DO that?!?!" is still a novelty.
 

isladogs

MVP / VIP
Local time
Today, 04:20
Joined
Jan 14, 2017
Messages
18,207
NG
Is the site for members only? The page loads displays briefly then shows a 500 error for me.
 

NauticalGent

Ignore List Poster Boy
Local time
Yesterday, 23:20
Joined
Apr 27, 2015
Messages
6,316
NG
Is the site for members only? The page loads displays briefly then shows a 500 error for me.
Not that I am aware of...I didn't do any registration to read the article. Strange...
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Yesterday, 22:20
Joined
Feb 28, 2001
Messages
27,121
Web error 500 is not necessarily a "members only" kind of error. That is "undifferentiated internal server error" which could be damned near anything included a corrupted server or a physical disk error.
 

isladogs

MVP / VIP
Local time
Today, 04:20
Joined
Jan 14, 2017
Messages
18,207
This is what I see

Medium.PNG


If the article is about reusing code as widely as possible I totally agree.
Coincidentally the screenshot below is part of an email I got today from SO
Capture.PNG
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Yesterday, 22:20
Joined
Feb 28, 2001
Messages
27,121
The "Error 500" page makes me think there is a front-end web server and a back-end content server in that mix and that the content server has choked on itself somehow. The error page is too detailed to have come from a downed web server but that could easily come from a web server that can't talk to its partners.

Speculation, of course.
 

Lightwave

Ad astra
Local time
Today, 04:20
Joined
Sep 27, 2004
Messages
1,521
I think I just enjoy the act of investigation more than 'work' sometimes.. I know I can get easily distracted when I have been on a project for a while and I suddenly remember some interesting thing that I wanted to take a look at..... 5 hours later...
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 04:20
Joined
Sep 12, 2006
Messages
15,632
A good programmer is not lazy, though.

A good programmer is insightful, and knowledgeable. A good programmer builds robust and resilient systems that incorporate good design, appropriate sense checking, error handling and general functionality. It's just easier to do it right than do it wrong. Do it right the first time, and you reduce the number of support calls you have to field.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Yesterday, 22:20
Joined
Feb 28, 2001
Messages
27,121
Dave. of course a good programmer knows how to make better mousetraps. But being constructively lazy means (to me) the ability to see economies in certain types of preparation. My earlier discussion of creating a template form first (with event and common-control infrastructure already in place) is one example. Analysis to anticipate common queries so you can design the indexing schemes and prepare a couple of template queries would also make sense. Deciding the order of appearance of controls in tab order based on minimizing a user's efforts in the most likely cases? Makes another type of sense. Make decisions to minimize your efforts to greatest effect.

We agree that a MAJOR element of being constructively lazy is doing it right the first time. 'cause if you haven't got enough time to do it right this time, how will you EVER find time to do it right later?
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 04:20
Joined
Sep 12, 2006
Messages
15,632
@The_Doc_Man

Yes, but I don't see any of that as laziness. it's skilful, efficient and effective, and not necessarily given to many, certainly not to all. It shows a real depth of understanding of both the real world (business) problem, and the appropriate logical world implementation.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Yesterday, 22:20
Joined
Feb 28, 2001
Messages
27,121
If laziness includes a definition of "avoiding hard work" then I plead guilty as charged.
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 04:20
Joined
Sep 12, 2006
Messages
15,632
@The_Doc_Man.
But you demonstrate regularly how un-lazy you are.

Take recursion, and the simple example of Fibonacci numbers,

This isn't lazy code. it's actually quite hard to understand. However, it's much easier to write the function with recursion, than without recursion. It's akin to the "magic" of mathematical induction.

Code:
Option Compare Database
Option Explicit

Function fib(a As Long) As Long
    If a = 0 Then Exit Function     ' just stop the recursion.
    If a = 1 Then
         fib = 1
         Else
               fib = fib(a - 1) + fib(a - 2)
        End If
End Function

Sub main()
MsgBox fib(5)
End Sub
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Yesterday, 22:20
Joined
Feb 28, 2001
Messages
27,121
But you demonstrate regularly how un-lazy you are.

First and foremost, thank you for that kind assessment.

But second, I'm not kidding. Along the lines of "pay me now or pay me later - with interest" I make maximum effort now to avoid over-the-top effort later. Avoiding continued work in every way possible. The fact that you recognized that I do in fact work hard about many things is merely evidence that I am trying to teach a mind-set that will stand well in the future. As we know, there are those who don't recognize this mind-set and cannot ever understand it - but I cast my bread on the waters anyway.
 

Users who are viewing this thread

Top Bottom