LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874

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 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616

Rep: Reputation: 167Reputation: 167
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: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
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: 10,649
Blog Entries: 4

Rep: Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934
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: distro hopper
Posts: 11,219

Rep: Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309
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,657

Original Poster
Rep: Reputation: 255Reputation: 255Reputation: 255
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: 490
Blog Entries: 4

Rep: Reputation: 238Reputation: 238Reputation: 238
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,657

Original Poster
Rep: Reputation: 255Reputation: 255Reputation: 255
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: distro hopper
Posts: 11,219

Rep: Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309
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
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,567
Blog Entries: 19

Rep: Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447
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,657

Original Poster
Rep: Reputation: 255Reputation: 255Reputation: 255
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 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616

Rep: Reputation: 167Reputation: 167
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: 10,649
Blog Entries: 4

Rep: Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934
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: distro hopper
Posts: 11,219

Rep: Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309
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 Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,804

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
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



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 02:58 PM.

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
Open Source Consulting | Domain Registration