Every line of code is always documented
mislav.uniqpath.com
Every line of code is always documented
1–10 of 104 posts
Re: Every line of code is always documented
#2sing absetively_posilutely my_bad check_this_out enough_said pwned You_know hey_Mikey_he_likes_it high_mucky_muck small_talk yada_yada_yada I_veto_that let_me_count_the_ways homo you_better_not bank driving piety but_of_course ho_ho_ho smurfs you_know_a_better_God it_figures charity I_have_an_idea hooah come_and_get_me game_over California on_occassion wrath You_get_what_you_pray_for
------
Your house is on fire and your kids are burning. You are at the store recounting your change, cause you think you got ripped-off.
Re: Every line of code is always documented
#3Spelunking through commit history shouldn't be necessary learn the intentions behind those kinds of actions.
Re: Every line of code is always documented
#4Re: Every line of code is always documented
#5 , two = "bar"
, three = "baz"
Agree with the author that this is easier to change, and in JS it will keep you from accidentally leaving a trailing comma. That being said, I find it to be very unreadable(which is where most your time will be spent) and most text editors/IDE's make it a burden to work with.Re: Every line of code is always documented
#6Re: Every line of code is always documented
#7This is exactly why I'm such a bastard when it comes to git history. A clean history isn't something that just gets filed and disappears forever. Unfortunately, lots of people think it's ok to use a message like "fixed stuff". Don't even try that in my codebase though.
Re: Every line of code is always documented
#8It sounds like "this.get(0).clientLeft" should have been a single-line function named something like triggerLayoutInMozillaAndFirefoxToFixAnimateForNewDomElement, or if you don't like massive function names, a comment that says that. Spelunking through commit history shouldn't be necessary learn the intentions behind those kinds of actions.
If you do need to go git spelunking to figure out what's going on, you'd have to be insane to not add a comment afterwards.
Either way, "shoulda coulda woulda". If the code doesn't have a comment, it doesn't have a comment. These things happen, and you can't change the past. But with git, you can relive it.
Re: Every line of code is always documented
#9Code like this is extremely brittle with or without that git history, don't rely on it like a crutch as it makes the code obscure, and updating a line somewhere may leave other similar lines updated or not. If you wanted to update the triggerLayout function, you would have to go through the git commit log for every .clientLeft line to see if that one was or wasn't used for triggering layout...