Official Muskateers Bartender
Proud Officer of Acme Fighting Co.
"It's a dangerous business, going out of your door, Frodo my boy." He used to say. "You step into the road, and if you don't keep your feet, there is no telling where you might be swept off to." ~ Frodo Baggins (Quoting Bilbo Baggins)
Bleh.... only took me 12 years to break a build without breaking the build. Oh well, at least it was an easy fix.
spent around half an hour trying to help a guildmate through a jumping puzzle during our event tonight.
finally, she ends up having to leave due to some work.
bleh. pretty tired :P
oh well. at least the rest was fun.
Doppelganger? Whatever are you talking about, my dear?
Drones.... man are they in the media something big now. What can be, what should be, etc. Privacy vs invasion. Protect vs vigilantism...
http://www.cnn.com/2015/09/09/opinio...nes/index.html
What people never considered in all of the opinion pieces I've seen to date... What exactly did people think would happen once we got flying cars?
Problem with lots of inventions. No one ever stops to think of the difference between "can we" and "should we".
The one story I remember is the man who shot down the drone that was spying on his sun-bathing daughter in their own back yard. I give him respect for having the constraint not to bounce the punks when they came looking for their drone - AND demanding payment for said damaged drone.
I have decided I need either :
1/ More sleep
2/ More booze
3/ More sleep and more booze
4/ All of the above and something else.
Atm i'm leaning toward #4 as this week has been s**t.
4 months of poor sleep and constant pain are slowly but surely wearing one down.
and now that whinge is over with wheres that bottle of red wine I got given by a client....
So... How bout dem Chokes last night?!?
I have absolutely ZERO use for pro sports, but turned on the game to see how fubar'd the highway was gonna be for my drive towards w***. (I have to drive right past the stadium)
So I caught the last 46 seconds of the game. Just in time to watch Denver make a TD to tie the game, for the Chokes to fumble the first play after and have Denver pick it up and jog it in for another TD with a couple dozen seconds left.
I about died laughing.
Until I hit the highway. . . . The usual mob of after game Drunk/Reckless/Spoiled tarded drivers were upgraded to PO'd/drunk/reckless/spoiled tarded drivers.
well.... I think I would have gone with 5/ 1 + 2 + conversations with doctors about the pain you are suffering + talking with physical therapist to see if your normal work is undoing the strengthening plan the therapist is doing + talks with wife and above folks.
I always get concerned when addictive substances are listed.
*Bekki wanders in...
*Tugs at collar to remove tie
*Yanks off suit jacket, and rolls up sleeves...
*Tosses cast off jacket, hat and tie to Hat Rack...
*Heads to the bar....
*Sets up and restocks...
*Preps the food and drinks for the day...
*Pours morning drinks for all...
Morning All !!!
Happy Friday!!!
Official Muskateers Bartender
Proud Officer of Acme Fighting Co.
"It's a dangerous business, going out of your door, Frodo my boy." He used to say. "You step into the road, and if you don't keep your feet, there is no telling where you might be swept off to." ~ Frodo Baggins (Quoting Bilbo Baggins)
nah she's all good. It's all under discussion but something the physio has said will be that way for several more months due to nature of the injury.
I like her though as her latest comment about my last weekends work that zombified me was in such a sweet subtle sarcastic way that she thought I wouldn't notice it.... she was wrong and we both had a major chuckle over it, basically she hinted I would heal better if it wasn't for me she has my sarcastic nature so we get on great.
So yes, your analysis is correct, but... sometimes mental health requires doing something completely different and hair letting down worthy, just so long as that activity doesn't cause more grief latter on - all things in moderation stuff
feels absolutely amazing to shorten something that would require several lines of code to just a few short lines.
for example, i'm writing a method to count the number of times a digit shows up in a number.
initially, i had a variable to count each digit, then i had the program check for each digit, then add one to the variable. if not, then it would check for the next variable... etc.
lots of code to write.
instead, i shortened it to this:
what that does is make an array for the variables. the slots are numbered from 0 to 9.Code:while(x!=0) { digit=x%10; tall=tally[digit]; tall++; tally[digit]=tall; x=x/10; }
then, it takes the value of the digit, and simply adds 1 to the appropriate slot.
shortens it all so easily.
felt so good when i figured it out
Doppelganger? Whatever are you talking about, my dear?
Good. Now take the next step and refactor it again. Do you really need the "tall" variable? How about "digit"? As you code more you'll start to think like this more and more.
What happens when you replace "digit" everywhere you see it and put in the math operation for it?
What is "tall" really being used for? Intermediate space. Do you really need it?
I don't mean to show you up, but show you where you'll end up if you keep at it, and thoughts/questions to ask as you code.Code:while(x!=0) { tally[x%10]++; x/=10; }
Now, in an ideal world what just happened here? I shrunk the code, but at what cost? Depending on just how smart your compiler is, not a whole lot. But lets assume your compiler is stupid. Your method may be better in the long run. You used more program memory (using "digit" and "tall") but by doing so, yours doesn't need a whole lot of stack memory to run.
Mine ends up using a lot of stack memory but less program memory.
This is something that you normally don't think about unless you are used to coding for systems that are really limited in the various space.
(reality is that hopefully the compiler is smart and uses the registers for those calculations so it doesn't end up in program or stack space.)
Granted this may be beyond what you know right now and if it is, I don't mean to confuse you.
I was trying to think of a way to get rid of the mod (%) but off the top of my head in a few seconds (first thing when I wake up) I can't. Why was I trying to get rid of %? The mods are very cpu intensive. For a standard PC and better, not an issue, but they can slow down and bog down micros if you aren't careful, and adding libraries can eat away your storage memory fast if you aren't careful. Yes, I know I'm showing age there given what they are coming out with now.
Missing, I don't see this as "showing him up" as much as your experience automatically taking the next step. I think DB did a great job figuring out how to shorten it up as much as he did. <kudos to DB>
Oh, and what CD said. As a Tech Writer, I can interpret and document the code much quicker with copious /*comments*/.
I agree 100%.
Comments that are worth a kitten any way.
i++; // adds one to i.
Comments like that are so worthless, I bloody hate them. Teachers always said "comment your code". They really should say "Explain what your code is doing, the why it is doing it in comments. I can do math, but why are you doing it?"
i++; // i is a temp variable only used in this section to be used to count the number of jellybeans in the jar.