LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices


Reply
  Search this Thread
Old 07-25-2017, 01:40 PM   #31
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 3,168
Blog Entries: 1

Rep: Reputation: 674Reputation: 674Reputation: 674Reputation: 674Reputation: 674Reputation: 674

I try to avoid mixed case and plurals when programming. And what the hell is ctr? And how is that "good"? I would assume counter. But I could just as easily assume counter terrorism resource, or counter technology regulation, or candice t. rice. At least we've progressed past the point of dropping all vowels to keep names <= 8 characters. At least on some of the languages and platforms.
 
Old 07-25-2017, 05:04 PM   #32
Luridis
Member
 
Registered: Mar 2014
Location: Texas
Distribution: LFS 8.0 Custom, Merged Usr, Linux 4.9.35
Posts: 472

Rep: Reputation: 114Reputation: 114
Quote:
Originally Posted by Shadow_7 View Post
I try to avoid mixed case and plurals when programming. And what the hell is ctr? And how is that "good"? I would assume counter. But I could just as easily assume counter terrorism resource, or counter technology regulation, or candice t. rice. At least we've progressed past the point of dropping all vowels to keep names <= 8 characters. At least on some of the languages and platforms.
The inference of counter from ctr in the context of "mainLoop" is a reasonable expectation of an experienced and thoughtful programmer. If you want to go the Full Monty, there's nothing wrong with that either.

Mixing cases makes it easier for your eyes to discern word separations and I hate typing underscores. What is important is the brain has a reason to break up words. If you don't think that's necessary, I suggest you download a plaintext book. Put it in a text editor, remove all spaces and punctuation and then tell us how much fun it was to read. I also prefer Allman braces, but there's real science in that preference. The science of the brain's love of symmetry and left-right eye movement + refocusing's contribution to eye fatigue and headaches.

Why Allman hasn't forced out all others on principals of body science alone is beyond me. Excessive eye movement leads to fatigue, when searching for braces, up and down are always necessary. Left and right eye movement are only necessary should one prefer a brace style based upon inefficient design.

Last edited by Luridis; 07-25-2017 at 05:10 PM.
 
Old 07-26-2017, 06:14 AM   #33
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Linux From Scratch, Slackware64, Partedmagic
Posts: 2,412

Rep: Reputation: 610Reputation: 610Reputation: 610Reputation: 610Reputation: 610Reputation: 610
on the subject of casing variables I use cased names for globals and all lower case for local variable, it makes it easy to see what the scope is at a glance.
 
Old 07-26-2017, 07:22 AM   #34
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 8,450
Blog Entries: 4

Rep: Reputation: 2915Reputation: 2915Reputation: 2915Reputation: 2915Reputation: 2915Reputation: 2915Reputation: 2915Reputation: 2915Reputation: 2915Reputation: 2915Reputation: 2915
Several guidelines for the pragmatic programmer:

(1) Don't try to re-write it. Just don't. I know that it stinks. Find a way to make the modification that best suits the particular trouble-ticket or change-order that you have been assigned. Don't go beyond the scope of that.

(2) Make your code look, and work, like what's there. Follow their de facto standards for variable naming, indentation, and so on. Use the objects that they used. I know that it stinks. Don't make it more evident than it already is that fifty people have been working on it for thirty years.

(3) Test the holy hell out of it, before you commit your branch, and don't merge it right away into the trunk. Your modification should include automatically-runnable(!) tests which will verify that the requirements of the ticket or change-order have been exactly met. Someone else will be responsible for desk-checking your work and merging it into the trunk.

(4) Don't write anything that has not been ordered. If the change-order or trouble-ticket does not expressly authorize it, don't do it. I know that it stinks. But, these are the changes – the only changes – that have been signed-off on from above. The rest of the code-base either works now, or contains defects that are probably known. (If you discover another defect, write it up.) Your change has been approved because it is understood to be limited and focused. So, it must be.

Last edited by sundialsvcs; 07-26-2017 at 07:25 AM.
 
Old 07-26-2017, 09:54 AM   #35
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: Slackware
Posts: 7,509

Rep: Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867
Quote:
(3) Test the holy hell out of it, before you commit your branch, and don't merge it right away into the trunk.
Yes, good programmers use version control. Your terminology sounds like you're still using subversion though...
 
Old 07-26-2017, 10:19 AM   #36
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,357

Original Poster
Rep: Reputation: 212Reputation: 212Reputation: 212
Quote:
Originally Posted by dugan View Post
Yes, good programmers use version control. Your terminology sounds like you're still using subversion though...
Subversion is awesome, isn't it? Anywhere source/data on the fly.
I wonder if it could be maybe made a bit littler subversion package.
 
Old 07-26-2017, 10:22 AM   #37
dogpatch
Member
 
Registered: Nov 2005
Location: Central America
Distribution: Mepis, Android
Posts: 257
Blog Entries: 1

Rep: Reputation: 58
My list is much shorter. In descending order of importance, every good programmer should be:

1. Arrogant
2. Stubborn
3. Slightly crazy
4. Intelligent
 
Old 07-26-2017, 10:25 AM   #38
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,357

Original Poster
Rep: Reputation: 212Reputation: 212Reputation: 212
Quote:
Originally Posted by dogpatch View Post
My list is much shorter. In descending order of importance, every good programmer should be:

1. Arrogant
2. Stubborn
3. Slightly crazy
4. Intelligent


That's not much helpful, rather off-topic
 
Old 07-26-2017, 01:11 PM   #39
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: Slackware
Posts: 7,509

Rep: Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867
Quote:
Originally Posted by dogpatch View Post
My list is much shorter. In descending order of importance, every good programmer should be:

1. Arrogant
2. Stubborn
No, that is the exact opposite of good.

Even if you're working excusively as a one-person team.
 
Old 07-26-2017, 01:17 PM   #40
hazel
Senior Member
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: Debian, Crux, LFS, AntiX, NuTyX
Posts: 1,256
Blog Entries: 1

Rep: Reputation: 573Reputation: 573Reputation: 573Reputation: 573Reputation: 573Reputation: 573
Quote:
Originally Posted by dogpatch View Post
My list is much shorter. In descending order of importance, every good programmer should be:

1. Arrogant
2. Stubborn
3. Slightly crazy
4. Intelligent
Then Lennart Poettering must be the greatest programmer ever!
 
Old 07-26-2017, 01:22 PM   #41
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,357

Original Poster
Rep: Reputation: 212Reputation: 212Reputation: 212
Quote:
Originally Posted by hazel View Post
Then Lennart Poettering must be the greatest programmer ever!
Actually, he did have a great, amazing, success. Today, SystemD is on most distributions. Does it prove the validity of the above rules?

I don't think that SystemD is that bad at all, since it only depends on the Unix-like distributions.

To smooth off the comment, there is actually some good in SystemD. Next to PulseAudio, it allows to have a nice system ideally suited for Ubuntu. Ubuntu isn't that bad, and SystemD is a nice add-on. SystemD is perfect for the desktop target of Ubuntu. Pulseaudio, Avahi, SystemD and more to come is a good solution for an Unix-like OS as Ubuntu. Ubuntu users usually do not matter that much that it is pulseaudio, sysD, or other. They are focused on desktop use. Despite the programming content, Pulseaudio and SystemD are being widely used and look rather stable enough for these type of distributions and for full user satisfactions. Ubuntu has become a widely installed and used distribution. Nothing to say, Ubuntu is present as a recognized Linux distribution.

(DE: https://www.golem.de/news/lennart-po...10-109649.html)

Last edited by Xeratul; 07-26-2017 at 01:40 PM.
 
Old 07-26-2017, 01:50 PM   #42
Luridis
Member
 
Registered: Mar 2014
Location: Texas
Distribution: LFS 8.0 Custom, Merged Usr, Linux 4.9.35
Posts: 472

Rep: Reputation: 114Reputation: 114
Can we leave systemd out of one discussion please?

Other than that...

rules+=1: Don't mix code. That is not to say, you can't use more than one language, just make sure they're in separate files of the appropriate suffix.
 
Old 07-26-2017, 03:56 PM   #43
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 8,450
Blog Entries: 4

Rep: Reputation: 2915Reputation: 2915Reputation: 2915Reputation: 2915Reputation: 2915Reputation: 2915Reputation: 2915Reputation: 2915Reputation: 2915Reputation: 2915Reputation: 2915
Quote:
Originally Posted by dugan View Post
Yes, good programmers use version control. Your terminology sounds like you're still using subversion though...
Actually, not usually. But the essential notion is that the release process (even "release to testing") is usually done by someone else other than the person(s) who developed the content of the fix- or feature-branch.

- - - - -

As for personal qualities, I would really prefer, "reliable, disciplined, and easy to work with." Don't need ego, and you're not as intelligent as you think you are, or if you are then nobody really cares because they know of course that they are much smarter than you. The one thing that I say to any team that I work with is: "Don't surprise me. I don't like surprises."
 
Old 07-26-2017, 04:27 PM   #44
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: Slackware
Posts: 7,509

Rep: Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867
Quote:
Originally Posted by Luridis View Post
rules+=1: Don't mix code. That is not to say, you can't use more than one language, just make sure they're in separate files of the appropriate suffix.
Oh god, yes.
 
Old 07-27-2017, 12:26 AM   #45
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,565

Rep: Reputation: 2811Reputation: 2811Reputation: 2811Reputation: 2811Reputation: 2811Reputation: 2811Reputation: 2811Reputation: 2811Reputation: 2811Reputation: 2811Reputation: 2811
Quote:
Originally Posted by Luridis View Post
Can we leave systemd out of one discussion please?

Other than that...

rules+=1: Don't mix code. That is not to say, you can't use more than one language, just make sure they're in separate files of the appropriate suffix.
When you work with bash (for example) and scripts usually you embed all of the sed/awk/whatever code into the shell script itself.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Could this article be retitled "Ten Simple Rules for Getting Help from LQ"? allend General 1 06-13-2012 10:59 AM
I Look for a good programme of the networks finsh Linux - Networking 2 02-24-2008 01:33 AM
LXer: Ten BY TEN. India's IT & BPO Outsourcing. LXer Syndicated Linux News 0 12-26-2005 03:31 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > General

All times are GMT -5. The time now is 06:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration