Loopy Discounts
-
E_CONTAINS_WHITESPACE
public/**/class/**/Program { /**/public/**/static/**/void/**/Main() /**/{ /******/Console.WriteLine("Hello, world!"); /**/} }
I've left the newlines in because otherwise the readability is terrible, and I didn't bother to look up how to avoid a literal space in that string constant.
-
I didn't bother to look up how to avoid a literal space
public/**/class/**/Program { /**/public/**/static/**/void/**/Main() /**/{ /******/Console.WriteLine("Hello,\sworld!"); /**/} }
FTFY
-
"Hello/**/World!"
-
-
I just switched back to Buxton Sketch The power of chalk is undeniable! Code is inherently erasable! Long live the chalk!
-
I quite like 3 spaces. It messes with all sorts of peoples' heads.
When I first started programming, I liked 3. Eventually, I was seduced into 4.
-
Both are indistinguishable at a glance
I always turn on Visual Studio's view whitespace option now... Because some of our code has mixed space/tabs. Or worse, blanks lines that contain only white space. KILLIT!!
-
I don't think I'd bother with any editor which didn't have visible whitespace as an option. Sure, I could use it to knock up a shopping list or something, but I want to use tools that support programming.
-
-
-
Because some of our code has mixed space/tabs. Or worse, blanks lines that contain only white space. KILLIT!!
Shift+Cmd+F
-
Same. Like a real spacist.
-
@Maciejasjmj said:
Both are indistinguishable at a glance
I always turn on Visual Studio's view whitespace option now... Because some of our code has mixed space/tabs. Or worse, blanks lines that contain only white space. KILLIT!!
You turn on an option to see stuff that annoys you, so you can see it and be annoyed by it?
Why not leave it off and live in blissful ignorance?
-
You turn on an option to see stuff that annoys you, so you can see it and be annoyed by it?
Why not leave it off and live in blissful ignorance?
discourse.org 127.0.0.1
Ahh.... :nirvana:
-
@Lorne_Kates said:
li
@Lorne_Kates said:
@Jaloopa said:
You turn on an option to see stuff that annoys you, so you can see it and be annoyed by it?
Why not leave it off and live in blissful ignorance?
discourse.org 127.0.0.1
Ahh.... :nirvana:
HELP! I've been hacked!
-
@Lorne_Kates said:
@Jaloopa said:
You turn on an option to see stuff that annoys you, so you can see it and be annoyed by it?
Why not leave it off and live in blissful ignorance?
discourse.org 127.0.0.1
Ahh.... :nirvana:
HELP! I've been hacked!
I have changed the entry in your Hosts file. Pray I do not change it again.
# discourse.org 127.0.0.1 discourse.org 205.186.175.153
-
@Lorne_Kates said:
205.186.175.153
What's that?
I don't want to open this at work in case it's something NSFW.
Filed under: [It isn't your website, that much I know](#717)
-
What's that?
bash$ host 205.186.175.153 153.175.186.205.in-addr.arpa domain name pointer ekiaioeqgq.c09.mtsvc.net.
-
Why not leave it off and live in blissful ignorance?
One day, one day you will have an obscure issue that can (eventually) be traced back to the wrong white space in the wrong place at the wrong time. This isn't going to change your behaviour, much.
Another day you might want to do something obsurce and simple with your source code and end up spending hours "fiddling" because of the wrong white space in the wrong place at the wrong time. This isn't going to change your behaviour, much.
...snip...
One day you will break (think of it as a form of Chinese water torture). When you have collected all of your toys and have put them back in the pram you will develop a very specific form of OCD that requires you to religiously police your white space after every few lines of code, so you don't have to go through the "torture" again.
Or is this just me?
:evil_smile:
-
I'm working on getting "
executiveexecution decision" powers ...You should go for those powers. More better.
-
I feel your pain.
if(something == null);
---> something = Something.generateEmptySomething();I spent half an hour looking at that once. When I hit the autoformatter it put the semi-colon on the next line and correctly indented the rest of the code.
-
MOAR FUN WITH LOOPS!
I was starting to pseudo-code this up, but it's too painful. Basically it involves three lists:
- A cart
- Properties of the first cart item
- Properties each subsequent cart item
It gets all the properties of the first cart item. Then loops through each other cart item
It gets the properties of each other cart item, and starts to remove items from the list that aren't in both lists. I'm still not 100% sure why.
At each step, it checks to see if one of the lists are empty. If so, it nullfies the list object.
AND THEN IT LOOPS TO THE NEXT ITEM.
So needless to say, item 2 ends up emptying the list, and thus nullifies the "properties" list of item 1.
Then item 3 comes around, and tries to compare to the "properties" list of item 1, which is now null. explosion
-
Or teach them Python so they learn something useful.
Like that Python sucks donkey balls for anything large?
-
Like that Python sucks donkey balls for anything large?
Python is a great glue language with many accessories (libraries). For anything large use libraries (and services) and glue them in Python.
Plus, when was last time children had to work on the next big thing? Python is great as a teaching language, exactly because it is a glue.
-
Plus, when was last time children had to work on the next big thing? Python is great as a teaching language, exactly because it is a glue.
TIL that children are out there, Python sniffing…
-
Python is a great glue language with many accessories (libraries). For anything large use libraries (and services) and glue them in Python.
Plus, when was last time children had to work on the next big thing? Python is great as a teaching language, exactly because it is a glue.So by "large", you think I mean "with a whole big pile of stuff that's already been written in someone's libraries"? Go away. I mean "with a whole big pile of stuff that hasn't been written in someone's libraries because it is my Python project's 'business' logic". When that pile gets large, the need to do type checking by hand, not by duck, gets to be a big, big burden. Tools like pycheck can only do so much, and they normally have to rely on duck-typing tests anyway. And the project I'm thinking of was not customer facing.
-
I mean "with a whole big pile of stuff that hasn't been written in someone's libraries because it is my Python project's 'business' logic".
I have never worked on enterprise-y software. I think you will have to endure Java for that. A much better choice is C#. C# also is a great language for teaching FWIW, useful and sensible (unlike VB).the need to do type checking
Use Type Hints. It is for Python3.5 but smart IDEs like Pycharm let you use it also in older Pythons. Numpy already has started using it, and I do not even need to quit my IDE to know the types.
-
@Steve_The_Cynic said:
I mean "with a whole big pile of stuff that hasn't been written in someone's libraries because it is my Python project's 'business' logic".
I have never worked on enterprise-y software. I think you will have to endure Java for that. A much better choice is C#. C# also is a great language for teaching FWIW, useful and sensible (unlike VB).
Here you divert somewhat from sense, by assuming that only enterprise-y software will have business logic in it. Furthermore, you ignored the quotes around the word "'business'", suggesting that I'm well aware that I'm not talking about business in any sort of enterprise-y sense. No, 'business' logic is just that part of my program that solves the problem I'm building it for, as opposed to 'internal' logic like how to actually parse an XML file (which should, indeed, be left to libraries).
@dse said:@Steve_The_Cynic said:
the need to do type checking
Use Type Hints. It is for Python3.5 but smart IDEs like Pycharm let you use it also in older Pythons. Numpy already has started using it, and I do not even need to quit my IDE to know the types.
Ah, that would explain the discrepancy between your reasoning and mine. My experience of Python dates from the 2.x days, for fairly small values of x, like 1 and 2.
-
Ah, that would explain the discrepancy between your reasoning and mine. My experience of Python dates from the 2.x days, for fairly small values of x, like 1 and 2.
It very well could. I also tried it 10 years ago and hated it, but a lot has changed, perhaps because big companies got interested in it and improved it a lot. I did not take another look until 2.7. Python 2.7 is a much butter language than <2.7. Python 3.5 has many fixes and additions to make it a great language if you want to start a new project.
-
I mean "with a whole big pile of stuff that hasn't been written in someone's libraries because it is my Python project's 'business' logic". When that pile gets large
When that pile gets large, you're making a big program that might actually be too big in the first place.
-
-
-
Indeed; rule 34 and all…