Not averse to writing comments where comments make sense, blanket bombing the source file with comments is just daft IMHO!
Plus, I don't think one can ever avoid discussions on clear enough code, they are called code reviews! Writing comments is no guarantee that it will still be clear in five years, a lot changes in our industry patterns, practices, styles, programming languages, architectures, people etc so there is no guarantee what made sense 5 years ago despite the comments, will still make sense 5 years on. I'd much rather refactor the code than refactor comments!
to one person a parameter in a function (e), means event, to another is meaningless.
Hench why i prefer function(event) over a comment saying e is event.
I have not been shown that writing like every single bit for variable names is needed in the last decade.
oh its 10 charters vs 1, so much ram and memory, and file size.
a decent compiler will parse it. I am not long names for the compiler, I am writing for some human.
We had lots of discussion about this at work too, about how extensively code should be commented, and if at all.
First there is a difference between commenting and documenting code. The latter you probably need to do anyway, at least for public APIs. Besides that, imho some visual indicator on top of each function / class etc makes it easier to navigate through code. So a short block on top of each function can act as kind of a separator (like headlines in normal texts), that allows to quickly see where a function starts. So (meanwhile) I add at least a single line with dashes on top of each function, and find that quite useful.
As for comments, I agree with those people, who say code should be written in a way that comments are not necessary. Means: Use names that say what it is about rather than comments, split complicated constructs into multiple steps, even if it appears less "cool" (functional programming!) etc.
However, there are cases, where comments are a good idea. Not just to explain some parts of the code that are hard to understand, but also to indicate that something might look like a bug or a wired construct, but is actually intended. Like this JS:
const a = parseInt(someString, 10);
if (!(a > 0))...
One might think "Wtf? Why not if (a <= 0)...?", and forget, that the former also takes care of NaN.
I came from a background of profusely commenting code to a job(last year) where comments are explicitly discouraged and code reviews will be failed if there is a comment.
There are a few cases where comments are allowed - for very complex issues - but other than that comments are not allowed.
I struggled at first but it has actually made me a better developer as I now have to read and understand what others have don in code rather than just read a comment and think I know what a method or stored procedure does.
So I am a convert to sparsely commented code as I tend to agree with the principle that writing comments means that you have to keep the comments up-to-date and it has encouraged me to both write better code and understand other peoples' code.
“That which can be asserted without evidence, can be dismissed without evidence.”
That's what I thought to begin with.
However the advantage of no comments is that that the code needs to be really tight and well written and the code reviews help that too - you cannot rely on the comments to make sense of the code so it needs to be well coded.
It has also helped me read and understand other people's code much better.
I am a convert.
“That which can be asserted without evidence, can be dismissed without evidence.”
Im getting Http 403 forbidden Error -You do not have permission to access /' on the server while navigating from one page to another page only for few users.
There is no log in EVentviwer and IIS logs for this 403 error.
Its working as expected without any issue while we try in individual web servers. whhile access through internet it throws error.
if there is an issue in Load balancer server, all users should get the error,
Since we are getting the issue only for few users dont have any clue where is the problem.
Please assist here with your inputs/suggestions.
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
I'm trying to bulletproof a contract for some freelance work. However, I can't seem to find any template that includes a clause on penalising a client for any delay they may cause to the project i.e. takes unreasonably long time to respond to clarifications, grant necessary access, etc.
How should this clause look under the contract and under which section? Any sample that you could share perhaps?
So I graduated last semester with a degree in business, it it wasn't until my senior year that I got into the world of data and coding. First it was R code and then SQL. My buddy told me about a job he got for a company in coding and he has very little coding experience but very high level math skills.
I applied and during the phone interview they told me that coding answers need some work but are still interested in hiring me if I can get my skill up a bit.
I bought a Java Text book and the online question package. I am also looking at Ruby through some apps on my phone because I see that it's a lot easier and should teach me the basic blocks quicker.
To shorten this long story, I am running off to Greece for three months with my wife to visit her family and I want to take this break to really bunker down and work on my coding skills.
Any recommendations on what to focus on (the company has their own coding program but they want people who already understand let OOP concepts) if things don't work out with this company I would like to have a backup goal.
What is the demand in right now? What should I be focusing on?
According to TIOBE website (https://www.tiobe.com/tiobe-index/) the big five are now Java, C, C++, Python and C#. Concerning "learning OOP by doing" C# is in my view a good choice (but I might be biased a bit...) as it is easier to learn (even with a free Visual Studio 2015 Community Edition, of with a free SharpDevelop environment), than the other 4 ... But it depends on the preference at the company that you mentioned (perhaps it is doable just to ask them which programming languages they use ? ...) Any way, I think there are many opportunities for C# developers, so it is not a waste of time to learn OOP using C# as you have 2 targets at once: OOP + 1 modern language from the "big five"
Good luck with your study ...
What would you include on a list of “If all these things happened in my professional life in IT, just once, I could die happy”?
• The client approved my proposal without any changes.
• A meeting ended 20 minutes early.
• I built my own nerd cave.
• The project plan was fully documented. And they didn't add a single thing.
What would you add?
I'm going to collect these and create a (fun I hope) short article. I won't be quoting anybody, just using the wish list items. So please tell me what should be included!
I've been briefed to "jazz up" this web site. I can handle the structural and ergonomic work, but I'll need some help with the general aesthetics, e.g. I think the plain white background is a worse turn-off than an ice-cold shower. The repeated content of the sliding banner I will take care of with actual photos of the business in various common acts that are part of the operation, and stuff like "Quick Links" at the bottom of the page? I can't even!
Some free suggestions are welcome, but it could easily become a gig for you if I like your initial assessment. My client will have to like your estimate though
Yes, and the half page wide "Free Quote" button in that same mustard. At least he has asked for more black and red, and the logo is black and white and that mustard, so my new black and white additions will match that, and the red add some sparkel.
One reason is that it is completely overused and unoriginal.
As was the question.
Choosing a weakness:
This kind of "advice" is the source of the problem you just painted. You do not choose one, you indentify one.
Like Share Comment CodeGround Online Testing Platform is an online assessment and evaluation system that helps Recruiters conduct online screening tests to filter candidates before the interview process.
Marked as spam.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
Last Visit: 31-Dec-99 19:00 Last Update: 8-Feb-23 4:43