Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
return0
Apr 11, 2007

quote:

Please enter a password with 8-10 upper and lowercase letters and numbers. Start with a letter and avoid using consecutive, identical characters such as 11 or rr.

Explicitly disallows passwords less than 8 or greater than 10 characters in length. Does not allow non alphanumeric characters.

Adbot
ADBOT LOVES YOU

return0
Apr 11, 2007
The 8 to 10 char password was in the registration process for the Virgin Mobile UK site.

return0
Apr 11, 2007
Is TFS super-crappy compared to git?

return0
Apr 11, 2007
IoC containers are cool and good in plangs where they are idiomatic (c# and java).

return0
Apr 11, 2007
I don't get it, why would you *not* use a container if you could? Why subject yourself to more resistance to refactoring, more hassle and dry fail when adding a parameter or composing an object graph?

The graph is already a dag, just implement it with a fluent container API and it's cool and done.

return0
Apr 11, 2007

RandomBlue posted:

This was already answered, but in most cases if there's a one to one relationship between two tables they should be the same table.

Is person to death date one to one?

return0
Apr 11, 2007

RandomBlue posted:

Unless you know people that can die twice, yes. One to one means there can only be one row in table A matching one row in table B not that there will always be a row in table B. Just like how one to many means that one row in table A can match one or more rows in table B but there doesn't have to be data in table B for every row in table A.

Depends if it's clinical death or legal death.

If the column is a Postgres date (with a resolution of 1 day), then many people will share the same death date.

return0
Apr 11, 2007

Absurd Alhazred posted:

Structural typing seems to be what you're describing. It's used by OCaml, Go, and you can also do this with templates in C++, actually.

Yeah Scala has this too.

return0
Apr 11, 2007

TheBlackVegetable posted:

Of course, but it looks nicer in F#

Sounds like java vs scala

return0
Apr 11, 2007

Spatial posted:

Here's another fun C oddity.
code:
int x[10] = { 0 };

int y = 9[x];
int z = x[9];
int w = *(x + 9);
This code compiles and the three variables have the same value.

This still works in C++

I have Stockholm syndrome because this seems totally normal and expected and cool to me.

return0
Apr 11, 2007
I think there is a closed form solution, but I'm not thinking much.

return0
Apr 11, 2007

Spatial posted:

The C preprocessor strikes again. Instead of using the built-in sized integer types in <stdint.h>, one very special team has defined all the types themselves and used them throughout their project:

C++ code:
#define INT_8_U unsigned char
#define INT_8_I signed char
#define INT_16_U unsigned short
#define INT_16_I signed short
#define INT_32_U unsigned
#define INT_32_I signed
This would be forgivable if it was to shorten the names and they were actual typedefs (u8, u16 etc are common). But nope, redundant, long and ugly is all you get. Bonus point for being written by former JavaScript developers.

Extremely bad and nasty.

return0
Apr 11, 2007

canis minor posted:

Every time I look up at babel.js/react.js/JSX combo I get angry. It's just one big why.

The why is you, as React is actually pretty good.


Volguus posted:

It doesn't store things in github, yet it manages to depend on github (that is, get hosed when github doesn't work). Specific example? How about the documentation:


So, if I write a package.json file that among other things is dependent on a github repo .... then what?

Python pip and Ruby gems are identical in this regard.

return0
Apr 11, 2007

canis minor posted:

Should have put more accent on JSX part; I'm not denying that react.js is nice - I just hate:

code:
var message = "Hello"
var container = (<div>
<span>
{message}
</span>
</div>)
Such notation tugs at something fundamental in me, as opposed to:

code:
var message = "Hello"
var container = "<div>\
<span>\
"+message+"
</span>\
</div>"
I guess when you have to deal with multiple template literals, you don't want to deal with substituting variables and you want something to do that for you, but still, this kind of transpilation seems... wrong to me.

edit: imho, there should be clear separation of presentation layer (JSX) from code (rest of react), preferably in their own files. This way you could use different templating engines as well and get rid of babel that does the assembly of the template

Yeah fair enough. For balance, another thing that sucks a bit about React is it's halfway-house CSS for inline styling, which is awkward for expressing hover states etc.


necrotic posted:

Ruby does not let published packages depend on git repos, only other published gemspecs (including to private gem servers). Bundler is for development and allows git references.

My bad, I misremembered.

return0
Apr 11, 2007

LOOK I AM A TURTLE posted:

This is where someone should step in with a Fermi estimate of how many nearly meaningless bytes URG bytes have been sent over the wire since TCP was invented.

I reckon a few hard drives full.

return0
Apr 11, 2007

The Fool posted:

If this guy can build full websites and java apps on this phone you sure as gently caress can type out [code] every once and a while on your lovely smartphone.

This is cool.

return0
Apr 11, 2007

Hammerite posted:

That code is definitely unreadable to me but I think that probably has more to do with not being familiar with Agda syntax in particular or functional language syntax in general.

Having said that, I think a lot of people (not necessarily all) read code in an "inner monologue" fashion and it is an impediment to reading code this way if there is no obvious (to the reader) way to pronounce something encountered in the code, for example if the name of an operator or symbol isn't known to the reader. I think whether the usage of a particular unicode character as a name is acceptable or not is dependent on whether the usage is standard or not, which is consistent with what I said in my previous boring post.

(It is also entirely reasonable to ban the use of non-ascii characters, or to mandate their use where convention would require it, based on the established convention for the language)

Why do you use this heavily parenthetical writing style?

return0
Apr 11, 2007

Hammerite posted:

I don't know. I have noticed it in my own writing in the past. Perhaps I am not very good at writing well-organised prose, and/or I am too ready to add asides that aren't really necessary. In general I tend to err on the side of verbosity, but I'm happy with that since I would rather be verbose and be understood than be terse and be misunderstood. Why do you ask?

I ask for a couple of reasons:

1. I used to do it in work emails often. A buddy of mine told me to stop as it came over as being tentative and unsure, despite this not being the case. I now try to force myself to write more tersely. I’m interested in if you’ve had the same feedback or experience?

2. When phone lurking, I zoom on the posts and don’t see the username or avatars. I don’t often recognise posters by their writing style in CoC. I did however recognise your post due to the parentheses, which piqued my curiosity.

return0
Apr 11, 2007

canis minor posted:

Ok, yes, though you could achieve the same thing as having previous states as snapshots of the DB, just like copying the CSVs :v:. I imagine as well, that you'd only want such behaviour if you're tweaking your algorithm (unless you're tweaking it all the time).
The person that will be implementing this though was handwaving about performance, and using CSV as a standard in Python machine learning (I don't know anything about the subject), and how you should always be using numpy + pandas + CSV over anything else, even local sqlite - hence the "why" question.

Don't get me wrong, I do appreciate all the points made - I'd happily accept if I was told "I want to open this dataset in Excel, see if it makes sense, maybe run some function on it that I know how to write in Excel" or "I want to operate on CSVs because that's what I'm accustomed to and seeing text files makes me happy".

It’s totally reasonable to abstract the model training implementation from the DB or API by using an exported immutable snapshot as its input. I’d personally use JSON lines or any other splittable format, but whatever.

Connecting directly to the DB is bad. Keeping snapshot archives as a DB dump is bad. Having splittable input is good.

You’ve characterised their response to your objection as hand waving. Perhaps that’s because this stuff is fairly standard good practice, and they didn’t understand where you were coming from.

return0
Apr 11, 2007

The horror is that it could be package-private but isn’t.

return0
Apr 11, 2007

Volguus posted:

Last time i checked @NonNull was not part of the standard. Is it now a part of the java specifications? I'm asking that because if @NonNull is not part of the standard, any complains you may have about its behavior cannot be brought against the language itself, but against the idiot IDE that you're using to program in said language.

It’s Lombok, which non-insane people use.

return0
Apr 11, 2007

Volguus posted:

Oh yes, Lombok. You're in the right thread then. Carry on.

Haha nice. Do go on, I’m interested in Lombok horrors if you have any stories?

return0
Apr 11, 2007
Our computer architectures class covered memory consistency and coherence models, I’m surprised to hear programmers expecting sequential consistency from x86.

return0
Apr 11, 2007

Xarn posted:

I don't know a single multi-core arch that is sequentially consistent by default. Now, I am not a CPU uarch expert, but from what I know, x86/x64 actually provide some of the strongest guarantees of modern architectures.

Mehhhh https://en.wikipedia.org/wiki/Memory_ordering#In_symmetric_multiprocessing_(SMP)_microprocessor_systems

return0
Apr 11, 2007
To be fair, having a single server up continuously for a month without interruption is not ideal.

return0
Apr 11, 2007

xtal posted:

The closest thing to a correct answer is kernel upgrades, but a lot of web developers will say that restarting your server periodically is the best solution to memory leaks.

We rolling replace hosts frequently in case any prior vulnerability caused that host to be owned as one plank of a defence in depth policy.

return0
Apr 11, 2007
Consider a hypothetical vulnerability, either in application code, kernel, etc., which owns a host and allows arbitrary fuckery, such that the fuckery survives a subsequent reboot and/or patch. It’s to mitigate this by reducing the scope of the impact by replacing the host. It’s not a silver bullet, but I think it’s a worthwhile and cheap addition to the defence.

return0
Apr 11, 2007
Replacing in this context refers to taking a host out of the load balancer and returning it to our cloud provider while simultaneously provisioning and bootstrapping a new host, and adding it to the load balancer.

Adbot
ADBOT LOVES YOU

return0
Apr 11, 2007

Carbon dioxide posted:

As far as I know, for certain things they actually use integers to represent something like one hundredth of a cent. For stock interests and stuff those amounts might add up and be relevant.

There's an infamous and most probably fake story about that, claiming that someone once hacked a bank so that for every of the billions of transactions happening each day, a sub-cent amount was taken out of the transaction and transferred from the sender to the hacker's bank account instead of to the recipient and because none of the normal bank computer views showed those precise amounts it took the bank ages to discover this.

This was in Hackers, a film starring Jonny Lee Miller and Angelina Jolie.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply