|
Hammerite posted:makes no reference of what RDBMS it is talking about anywhere in the header or footer material of the page, nor in the URL The "5.1" part in the URL is actually a dead giveaway.
|
# ? Feb 3, 2015 14:04 |
|
|
# ? Jun 8, 2024 04:19 |
|
ErIog posted:You posting that made me wonder if any of these modern languages allow variable names written in Unicode characters. Does C++ count?
|
# ? Feb 3, 2015 14:20 |
|
JS has allowed it since...1998?
|
# ? Feb 3, 2015 14:22 |
|
Swift allows unicode. https://github.com/mattt/Euler/blob/master/Euler.swift
|
# ? Feb 3, 2015 14:46 |
|
Java and C# too. Just because you can have weird-rear end confusing Unicode identifiers, doesn't mean you should, just like ASCII identifiers.
|
# ? Feb 3, 2015 14:46 |
|
PHP allows it!code:
|
# ? Feb 3, 2015 14:57 |
|
Skuto posted:The "5.1" part in the URL is actually a dead giveaway. All right, smarty pants, but we shouldn't need to rely on being able to spot something so obscure (or searching the page for "MySQL", or any other workaround)
|
# ? Feb 3, 2015 15:13 |
|
Scala has a control structure that uses => as a separator. Of course ⇒ is also a legal replacement and intellij has a setting to automatically replace it for you.
|
# ? Feb 3, 2015 15:14 |
|
I once made a chess program in C#, and for kicks I was planning on having the names of the Pieces enumeration be the actual Unicode chess piece characters. Unfortunately that was not allowed.
|
# ? Feb 3, 2015 15:34 |
|
shodanjr_gr posted:Access control semantics derived by (and imposing) capitalization...How isn't this a horror? It works in practice extremely well and it works everywhere, i.e. comments are unexported to doc tools if they start with a lowercase letter. I don't really see a problem with using capitalization rather than strange keywords that barely enforce access control (private/public/etc). It's also nice because you can choose parts of object to export. Having a unexported struct with certain fields/methods exported is common and easy to read.
|
# ? Feb 3, 2015 17:03 |
|
SupSuper posted:Java and C# too. Just because you can have weird-rear end confusing Unicode identifiers, doesn't mean you should, just like ASCII identifiers. Which reminds me of one of my favorite Java-isms, Unicode escapes. Unicode escapes, sounds simple enough, right? Instead of writing "Σ" you could write "\u03A3". Nothing weird about that, right? As it turns out, Unicode escapes are parsed first, prior to any tokenization. Meaning that: int \u03A3 = 1; System.out.println(Σ); Is valid java and prints 1.
|
# ? Feb 3, 2015 17:19 |
|
Voted Worst Mom posted:It works in practice extremely well and it works everywhere, i.e. comments are unexported to doc tools if they start with a lowercase letter. I don't really see a problem with using capitalization rather than strange keywords that barely enforce access control (private/public/etc). It's also nice because you can choose parts of object to export. Having a unexported struct with certain fields/methods exported is common and easy to read. Seems ever so slightly inconvenient to have to update references to an unexported thing when changing it to exported?
|
# ? Feb 3, 2015 18:01 |
|
HappyHippo posted:I once made a chess program in C#, and for kicks I was planning on having the names of the Pieces enumeration be the actual Unicode chess piece characters. Unfortunately that was not allowed. All sorts of fun with pawn promotions.
|
# ? Feb 3, 2015 18:10 |
|
Xenoveritas posted:Which reminds me of one of my favorite Java-isms, Unicode escapes. Unicode escapes, sounds simple enough, right? Instead of writing "Σ" you could write "\u03A3". Nothing weird about that, right? I think that's pretty cool and good.
|
# ? Feb 3, 2015 18:18 |
|
KernelSlanders posted:Now I must resist the temptation to name a function ねこです. It's very easy to resist: stop watching anime, you nerd.
|
# ? Feb 3, 2015 18:30 |
|
I think the underhanded code dev people should be having a field day with this. I'm getting a sudden urge to complement the functionality of the base class method HttpClient.Authenticate(user, pass) with some special sauce in the secure derived class method HttpsClient.Authenticate(user, pass), and yes of course that's a complementary utility method and not an override you dolt, didn't you notice the uppercase greek alpha character in the method name?
|
# ? Feb 3, 2015 18:46 |
|
I just started a new job as a QA automation engineer and the other guy on my team is something. public void thing() { declaration declaration declaration declaration assert declaration mutation declaration assert assert declaration assert assert } why
|
# ? Feb 3, 2015 19:08 |
|
Wheany posted:I think that's pretty cool and good. The problem is that it's only really useful in two circumstances: when you're accessing a third-party library that has symbols that use characters you can't encode as proper text for whatever reason, or when you want to write obfuscated code. Java code:
|
# ? Feb 3, 2015 19:39 |
|
Reminds me of this from Java Puzzlers:Java code:
|
# ? Feb 3, 2015 20:17 |
|
Steve French posted:Seems ever so slightly inconvenient to have to update references to an unexported thing when changing it to exported? It is, which is why there's https://golang.org/cmd/fix/ and other similar things. Go has good tooling despite everything else.
|
# ? Feb 3, 2015 20:23 |
|
it is posted:I just started a new job as a QA automation engineer and the other guy on my team is something. It is hard to tell exactly what you're complaining about.
|
# ? Feb 3, 2015 20:31 |
|
Let's say this test fails on the first assert. The developer makes a fix and the test fails in a new place for an entirely unrelated reason. This should probably have been split into at least 3 different tests; by the time you're asserting stuff you're done writing the logic for the test.
|
# ? Feb 3, 2015 20:37 |
|
it is posted:Let's say this test fails on the first assert. The developer makes a fix and the test fails in a new place for an entirely unrelated reason. who cares
|
# ? Feb 3, 2015 20:45 |
Internet Janitor posted:Reminds me of this from Java Puzzlers: Reproduced it in c#, is the joke that it prints two lines?
|
|
# ? Feb 3, 2015 20:53 |
|
Manslaughter posted:Reproduced it in c#, is the joke that it prints two lines? I haven't compiled it, but I think it's that the "\u000A" in the comment is interpreted as a LF by the compiler, splitting the comment onto two lines, and only the first line will start with // so you get a syntax error.
|
# ? Feb 3, 2015 21:04 |
|
b0lt posted:who cares Anyone who cares about following testing best practices.
|
# ? Feb 3, 2015 21:05 |
|
HappyHippo posted:I haven't compiled it, but I think it's that the "\u000A" in the comment is interpreted as a LF by the compiler, splitting the comment onto two lines, and only the first line will start with // so you get a syntax error. Correct. If you read section 3.2 in the Java spec, Unicode escapes are handled in step 1, and comments are discarded in step 3.
|
# ? Feb 3, 2015 21:08 |
|
Munkeymon posted:Anyone who cares about following testing best practices. For integration or systems tests, OK. But for unit tests, if a developer breaks a long test like this, using best practices they'll find out immediately before anything is even committed and will also perform the second fix then. I like these style of tests more than fifty tests called DoXButWithModificationOfYandZbutNotQ.
|
# ? Feb 3, 2015 21:45 |
|
baquerd posted:For integration or systems tests, OK. But for unit tests, if a developer breaks a long test like this, using best practices they'll find out immediately before anything is even committed and will also perform the second fix then. I like these style of tests more than fifty tests called DoXButWithModificationOfYandZbutNotQ. I won't take advice from you, because you're an idiot.
|
# ? Feb 3, 2015 22:02 |
|
Xenoveritas posted:Which reminds me of one of my favorite Java-isms, Unicode escapes. Unicode escapes, sounds simple enough, right? Instead of writing "Σ" you could write "\u03A3". Nothing weird about that, right? http://en.m.wikipedia.org/wiki/Digraphs_and_trigraphs
|
# ? Feb 3, 2015 22:12 |
|
Xenoveritas posted:[code=java]\u002F\u002A It helps that just about nothing that highlights Java a) Is this actually a widespread thing? b) If it is a problem, use an interpreter that follows the spec. That "\u002F\u002A" is an interesting quirk, but not something anyone would actually do anywhere except when showing off (in for example a "Coding horrors" thread).
|
# ? Feb 4, 2015 00:03 |
|
it is posted:I won't take advice from you, because you're an idiot. That's OK, they pay me way more than the testers anyway.
|
# ? Feb 4, 2015 00:06 |
|
it is posted:Let's say this test fails on the first assert. The developer makes a fix and the test fails in a new place for an entirely unrelated reason. This should probably have been split into at least 3 different tests; by the time you're asserting stuff you're done writing the logic for the test. Are you always done writing the logic for a test once your start asserting? What if you want to assert the invariants hold true before, during, and after execution of some process? It's hard to tell what you're complaining about with your example. If it is three different tests then it should be three different tests; assertion doesn't imply the end of test.
|
# ? Feb 4, 2015 01:17 |
|
it is posted:I won't take advice from you, because you're an idiot. , says the 2011 regdate. Enjoy your arbitrary rules not based on a sensible theory of harm.
|
# ? Feb 4, 2015 01:47 |
|
Voted Worst Mom posted:Are you always done writing the logic for a test once your start asserting? What if you want to assert the invariants hold true before, during, and after execution of some process? It's hard to tell what you're complaining about with your example. If it is three different tests then it should be three different tests; assertion doesn't imply the end of test. Leaving aside the "during", testing whether an invariant holds true before some process seems like a clearly different test than testing whether an invariant holds true after some process - you're not really testing said process at all in the first case, you're testing whatever you were doing before that process.
|
# ? Feb 4, 2015 01:57 |
|
I'll note that none of the examples in that article look exactly like string escape sequences and are designed to solve a problem that essentially did not exist at the time Java was being developed. (To the point where C++ is planning on removing support for them entirely in C++17.) Wheany posted:a) Is this actually a widespread thing? People using Unicode escapes to write unreadable code? Only when purposely trying to write unreadable Java. It's just a weird quirk of Java that I doubt anyone would expect. However, things like that Java puzzler Internet Janitor posted? Those are things I could see people running into and not understanding why the following is not valid Java and will not compile: Java code:
Java code:
Xenoveritas fucked around with this message at 02:07 on Feb 4, 2015 |
# ? Feb 4, 2015 02:04 |
|
hosed up if true.
|
# ? Feb 4, 2015 02:19 |
|
Meanwhile, in embedded (really, Android) land, we discovered a vendor has been shipping drivers that try to load firmware...using a relative path...while being loaded in the application context. Took about a week of debugging to see why our software just wouldn't work on a peculiar set of devices.
|
# ? Feb 4, 2015 14:14 |
|
Skuto posted:Meanwhile, in embedded (really, Android) land, we discovered a vendor has been shipping drivers that try to load firmware...using a relative path...while being loaded in the application context. I would probably just cry a little bit at that point.
|
# ? Feb 4, 2015 14:35 |
|
|
# ? Jun 8, 2024 04:19 |
|
Skuto posted:Meanwhile, in embedded (really, Android) land, we discovered a vendor has been shipping drivers that try to load firmware...using a relative path...while being loaded in the application context. Well on the plus side, depending on the specific path and whether they've shipped anything to anyone yet, you might have a CVE soon?
|
# ? Feb 4, 2015 15:09 |