|
|
Success!
This is why we document.
Also, this is why we document clearly (we hope).
Because we may (and often are) the end-user or our own documentation.
Way to go.
I writes things down so I don't have to remember thems.
I writes thems down clearly so I don't has to understands them later.
EDIT
I finally guessed how to add that dancing gif. This is the best thing I've done all week (maybe year).
|
|
|
|
|
raddevus wrote: I finally guessed how to add that dancing gif
Well done!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
OriginalGriff wrote: Well done!
Made me LOL!
|
|
|
|
|
raddevus wrote: This is the best thing I've done all week (maybe year)
I think you can take the rest of the year off...
"The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge". Stephen Hawking, 1942- 2018
|
|
|
|
|
|
Quote: This is why we document. It certainly is.
I document my code assuming that in six months or more I will be coming back to it and saying, "What the heck does this do? ...and how? ...and why?"
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
CP just justified its existence...
"The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge". Stephen Hawking, 1942- 2018
|
|
|
|
|
Kornfeld Eliyahu Peter wrote: CP just justified its existence...
Yeah - way better tool than SharePoint!
|
|
|
|
|
|
You, are sub species aeternitas !
«... thank the gods that they have made you superior to those events which they have not placed within your own control, rendered you accountable for that only which is within you own control For what, then, have they made you responsible? For that which is alone in your own power—a right use of things as they appear.» Discourses of Epictetus Book I:12
|
|
|
|
|
BillWoodruff wrote: You, are sub species aeternitas !
Sadly though, I think there's an expiration date on articles, so no eternity for me!
|
|
|
|
|
BillWoodruff wrote: sub species aeternitas !
The last thing I would want is Eternity in a body that continually grows older (and more decrepit). Eternity in a healthy 20-year-old's body, now...
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Alright, time for a rant.
I've just had Office 365 install an update on my system, and as usual, it asked me to shut down Outlook before proceeding.
This is one of those installs that don't show any progress or provide any feedback once the update process in underway. It also never tells you when it's done. So I have no indication as to whether it should be ok for me to restart Outlook or not.
I've relied on the presence of officeclicktorun.exe (as a running task) in the past to determine whether those O365 patches are done installing, but it seems these days I always have an instance of that running and never going away. mscorsvw.exe also seems to commonly get launched when O365 updates are being installed, but I've also seen instances where it's just sitting there, with no CPU or disk activity, so I still have no idea whether it's done or not.
Microsoft, I realize you want to make as many things run transparently in the background as possible, so as not to interrupt the end user, but can you please let me know when I can restart the apps I was asked to shut down? Because while in that state, my workflow already has been interrupted.
|
|
|
|
|
It's very annoying. But I generally find that if I let the updater close the applications, it restarts them for me when it's finished.
Even if I shut Outlook down manually, seeing Skype for Business start up again usually indicates that the update is done.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Silent updates.
Holy elephant.
Where's my gun?
Where's my keys?
Round and round we go bitching bout this.
Don't they know that some'r unstable when pissed?
- drawing a blank - can't finish it.
|
|
|
|
|
I remember seeing a small icon in the notification area when it's updating, unless they changed that?
(It's why I always set pref to show all icons in the notification area.)
|
|
|
|
|
Windows Update != Office Update
|
|
|
|
|
If you saw this, what would you say I was doing?
public class BrokenFizzBuzz
{
public void WowMeWithFizzBuzz(int upperLimit)
{
for (int count = 0; count < upperLimit; count++)
{
if (count % 3 == 0)
{
Console.WriteLine($"{count} - Fizz");
}
if (count % 5 == 0)
{
Console.WriteLine($"{count} - Buzz");
}
if (count % 5 == 0 && count % 3 == 0)
{
Console.WriteLine($"{count} - FizzBuzz");
}
}
}
} (Yes, I know it's broken and doesn't do what you'd expect from FizzBuzz, that's deliberate).
I've decided to write up a series about using Visual Studio to help debug applications. It all started with a thread in the C# forum this week where it was suggested that debugging wasn't being taught. This lead me to think that there was a gap here that needed addressing. So, I'm writing about how to go about debugging. We're starting with the C# equivalent of printf. So the question is, is this useful? Is it only a minority that don't know how to debug or is this a wider issue that needs to be taught? If it's a minority of developers, then am I wasting my time here? Who put the bang in the BangShangALang and who put bop in the BopShooBopShooBop?
This space for rent
|
|
|
|
|
inside the for loop:
if count is evenly divisible by 3, write the count and the word "Fizz"
if count is evenly divisible by 5, write the count and the word "Buzz"
if count is evenly divisible by 3 and by 5, write the count and the word "FizzBuzz"
Possible issue (depending on requirements) - if the count is evenly divisible by 3 and by 5, your output will be (showing only the first occurrence)
15 Fizz
15 Buzz
15 FizzBuzz
Whether or not it's "broken" depends entirely on the requirements, since the code looks like it will compile and run fine (absent your response to my question at the end of this post). I think this is what the requirements would (or should) be:
public static void WowMeWithFizzBuzz(int upperLimit)
{
for(int count = 1; count <= upperLimit; count++)
{
if(count % 5 == 0 && count % 3 == 0)
{
Console.WriteLine(string.Format("{0} - FizzBuzz",count));
}
else if(count % 3 == 0)
{
Console.WriteLine(string.Format("{0} - Fizz",count));
}
else if(count % 5 == 0)
{
Console.WriteLine(string.Format("{0} - Buzz",count));
}
}
}
The code above will generate:
3 - Fizz
5 - Buzz
6 - Fizz
9 - Fizz
10 - Buzz
12 - Fizz
15 - FizzBuzz
The output from your original method would be as follows and would require an max value of 16 to get to 15 (not exactly intuitive):
0 - Fizz
0 - Buzz
0 - FizzBuzz
3 - Fizz
5 - Buzz
6 - Fizz
9 - Fizz
10 - Buzz
12 - Fizz
15 - Fizz
15 - Buzz
15 - FizzBuzz
Is your code example useful? Yes. It forces the programmer to fix someone else's code to meet requirements (an every-day real-world situation). BTW, having them add comments to the code to show that they understand what they're doing would be beneficial as well.
BTW, I've never seen the "${variablename} " notation before. Is that something new in .Net?
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
modified 17-May-18 12:31pm.
|
|
|
|
|
The dollar notation is the new string interpolation feature.
This space for rent
|
|
|
|
|
I don't like it.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
|
You're right - I didn't like any of them.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
You're a craftsman after all.
You don't need no stinkin' power tools.
All you need...
https://i.stack.imgur.com/KcOBv.png^
I mean they take a little longer, but they work just like they used to.
|
|
|
|