|
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!
|
|
|
|
|
You just get a feel for who can be helped and who can't. I can predict with a very high success rate who is not going to respond to requests for more info, who is going to just re-iterate the problem, who is just going to respond "Can you show me the code". Most people need a very specific answer and unless you can provide that specific answer then you're usually wasting your time. Anyone who says they got an error but don't think the text of the error is important enough to include in the question, or the line the error happened, or anyone who thinks "doesn't work" is enough information for someone to help them simply doesn't have the coding mindset. They don't think like a coder and I'm not sure that's something you can teach.
In some respects the internet is widening the coding gap. It is now so easy just to give up at the first hurdle, dump your code somewhere and say "gimmie codez pls, its urgent", but what do people learn from others fixing their problems? Sometimes very little...give a man a fish and all that. Back when I was flipping switches on the front of a PDP-11 to input a program I had written on paper and converted to binary assembler instructions by hand there was no pdp11overflow to go on and say that my Polish notation "doesn't work", the only option you had was to learn debugging strategies.
|
|
|
|
|
Mostly yeah. Depressing though it is ... every now and then, one of 'em will surprise you.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
If I only had back the hours I spend inputting the BIOS on my IMSAI 8080 using front panel switches...
|
|
|
|
|
F-ES Sitecore wrote: just dump their code and ask for the solution
The ones who dump their own code are mostly not beyond help.
The ones who dump someone else's code that they found somewhere on the internet, in an article that sounded vaguely-related to the problem they're trying to solve, but they don't have a clue what it does or how it works - they're the ones you need to watch out for.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Pete O'Hanlon wrote: So the question is, is this useful?
I saw that post you're referring to.
If you look at the quality of the posts like that and the level of effort, I'd have to say "No". Not because what you would provide isn't useful, but because the people posting those types of post aren't really looking to learn debugging... They're looking for the quick answer and some code they can paste.
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
Well, sure it should be useful.
But the main points I hope you'll cover are:
The primary debugger is your own brain. Often times after giving it a bit of a rest.
Logging progress is still very effective for console applications, but I have no idea whether or not it's useful for lesser applications.
A software debugger is a last resort, for really tough bugs and really tired brains.
|
|
|
|