|
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.
|
|
|
|
|
I generally hate syntactic sugar for the sake of it as much as the next guy, but this is one of those rare instances where I've grown to really like it. Much less opening and closing of quotes when chaining things together, and you can put in pretty much any type of expression.
|
|
|
|
|
I'm glad I'm approaching retirement age...
".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
|
|
|
|
|
As long as you don't have to do localization.
There's no officially supported way (and the few 3rd party attempts I saw were scarily hackish things I'd not want in production) to put $ strings in a .resw file and run them through the .net localization engine. You're forced to use oldschool String.Format("{0} - FizzBuzz", count) instead (different word orders make string concatenation really sketchy for this).
And I've really came to like string interpolation for the same reason you do.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|
|
I am so used to the formatting that I had to get used to it, but it makes more sense than the formatting and is easier to read.
|
|
|
|
|
It's awesome (used appropriately). It lets you inject code.
var person = "Me";
$"I {(person == "Me" ? "do" : "don't" )} like it."
var person = "You";
$"I {(person == "Me" ? "do" : "don't" )} like it."
|
|
|
|
|
Pete O'Hanlon wrote: Who put the bang in the BangShangALang
No one: it's at the start, not contained.
Pete O'Hanlon wrote: who put bop in the BopShooBopShooBop?
The Platters.
As for the article: go for it! I was thinking of writing one myself, in my copious spare time, but I think you'll do a better job of it.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
None of the people that need to read it will do so.
".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
|
|
|
|
|
But at least you'll be able to point them to the article and tell yourself you've done your part.
|
|
|
|
|
Rubbish. I'm tired of doing my part. :/
".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
|
|
|
|
|
Then let others do it for you. I never get tired of that...
|
|
|
|
|
These are the same people who can do a simple google search to resolve their programming problems but don't. It's usually something someone has already faced and asked about it on the internet.
I am not the one who knocks. I never knock.
In fact, I hate knocking.
|
|
|
|
|
|
In my opinion people that have seemingly no debugging skills and just dump their code and ask for the solution simply don't have what it takes to be developers, they just don't have the mindset. When you meet a problem if your first instinct is to ask for help rather than trying to dissect that problem then how can you possibly be a coder? Coding is all about problem solving and if you lack the drive and instinct to do that then you'll never succeed.
Also you'll find that the people that don't debug and just dump their code are also far more likely to just want you to fix their code. If you explain why their code doesn't work, or give them a hint at why it doesn't work, or suggest what they can look at to make it work then invariably the response is just "Could you update the code for me." Not only do these types not have the mindset to code, they don't actually want to learn either, so there is no point in helping them, you're just wasting your own time.
|
|
|
|
|
F-ES Sitecore wrote: so there is no point in helping them, you're just wasting your own time.
That's a self fulfilling prophecy, to an extent: if you don't try, you can't succeed; just like you can;t win a lottery unless you buy a ticket (which appears to go right over the head of many: Lottery fraud | Action Fraud[^]).
And besides: perhaps what they need is to be told what to do, and how to do it? If you have no idea that a tool (the debugger) and a skill (debugging, or even "thinking" in some cases) even exists, how can you expect them to use it? Converting just one from the Dark Side to join Luke, Leia, Han, and the Rebel Alliance could turn the whole war on stupidity!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|