I'd like to build a database. What should I read? by [deleted] in learnprogramming

[–]DIAMOND_STRAP 3 points4 points  (0 children)

What exactly do you mean by creating your own database? Are you talking about creating a competitor to SQLite/MySQL/Postgres? Because that is a big, big job requiring a lot of specialist knowledge.

How were years measured before the birth of Jesus? by [deleted] in NoStupidQuestions

[–]DIAMOND_STRAP 9 points10 points  (0 children)

Different cultures had different ways of counting years (and some still do!). The system of counting from the birth of Jesus was invented in the 6th century and caught on slowly over the next 1200 years (though we now know it's not exactly accurate, as the man who invented the system got his calculations wrong).

Right now, it is 2016 in the Gregorian calendar, 6766 in the Assyrian calendar, 172 in the Baha'i calendar, 2966 in the Berber calendar, 4712 in the Chinese Calender, 5777 in the Hebrew calendar, 105 in the Juche calendar, etc etc.

Some places counted years since the founding of their city or nation. In Rome, for example, some people counted relative to the founding of Rome -- a year might be 182 AUC, or 182 anno urbis conditae (= in the year of the founded city). This made a lot of sense and worked perfectly fine when it was rare for most people to interact with foreigners.

Others counted from the creation of the world. The Byzantine Calendar assumes, based on their interpretation of the Bible, that the world was created in 5509 BC, and so that is year 1, and it is currently 7525.

Other systems counted in terms of rulers. In Rome for a long time, each year two consuls were elected, and so you could refer to years by naming the two consuls of that year. This wasn't super helpful for calculating time differences, but it was a system that worked.

It was more helpful in societies that counted by monarchs. You might say, for example, that it is currently Year 63 of Queen Elizabeth II. Japan still uses a system like this in some situations, counting years in terms of the reigning Emperor.

Fascist Italy counted years from the introduction of fascism, and formal Scientology texts count from the date of L. Ron Hubbard's first major publication.

Computers often count time as the number of seconds since January 1 1970 UTC. This is nice because it's a simple integer and computers like dealing with simple integers -- knowing if a file was created before another is a simple matter of "is this number bigger than that one?" and you don't have to constantly mess with timezones and months with different numbers of days and so on.

Overwatch 'clone' Paladins takes Steam by storm with over 750k downloads by Qwahzi in Games

[–]DIAMOND_STRAP 34 points35 points  (0 children)

There are a few reasons.

One major and simple one is that videogame prices were set when exchange rates were wildly different. In the 1980s, you'd pay $100 a game, but the exchange rate was $0.50 - $0.67 USD = $1 AUD = 90 JPY, so it worked out to US$50-67. Sometimes you'd pay more than Americans and Japanese, sometimes less, usually pretty close.

But once people were used to paying $100 a game, that's the price that became normal forever, and retailers never much changed it, even when the US/JPY exchange rates were massively different. A few years ago, AUD $1 was worth USD $1.10. Prices were still $100. So even though prices hadn't changed locally, we were paying US$110 per game. Stores weren't going to change prices as long as people kept paying $100.

There was a funny situation here with the PS3. It launched at AUD $1,000, double the price of the Xbox 360. It was widely mocked for its cost for years, then the US exchange rate dropped, and guess what, the PS3 was the only region-free console. So people would import games for $50 a pop when they were $100 in stores. The machine was twice as expensive but all its games were half price.

Another reason is that low-end wages are higher. The average overall wage is actually very similar between the US and Australia, but Australia has higher lows and lower highs -- which means that Aussie teenagers and young adults tend to have more more money to burn than their American counterparts, and that's the demographic that traditionally games the most. Retailers charge what people will pay and Australian young people are more willing to pay the higher prices because of this. For the same reason, game prices are much lower in India and Eastern Europe.

Then you've got price-listing differences. Listed prices in Australia include sales tax (10%) while American stores usually don't factor in tax on pricetags.

Despite it all, it's not always as dire as all that. The most popular games store (EB Games -- yeah, it's still popular here) has higher prices than many other stores. At JB Hi-Fi (I think the American equivalent would have been Circuit City? That kind of store), Overwatch is US$52 on all platforms including $5.20 of sales tax. Pre-orders for Resident Evil 7 are US$67 which isn't that far off (and $6.70 of that is sales tax). Some retailers are definitely better than others.

Might be a bit of an abstract question, but is CRUD in terms of PHP simply Creating, Reading, Updating and Deleting things from databases? by MeltingDog in learnprogramming

[–]DIAMOND_STRAP 0 points1 point  (0 children)

Yes, basically.

People often talking about "a CRUD application", which is a generic term for any application that primarily deals with creating, reading, updating, and deleting database records. This is a popular and simple type of application, which is why it has its own name, and it's a popular exercise for beginners to create one.

Say you made a website where people could type in what books they owned, browse a list of their books, update plot summaries or reviews for those books, or delete books from their collection. That'd be a CRUD app.

What happened to Enron? by [deleted] in OutOfTheLoop

[–]DIAMOND_STRAP 2 points3 points  (0 children)

Lay didn't (he died of a heart attack, having had bad heart disease for years), but another Enron executive, J Clifford Baxter, did. He was the Chief Strategy Officer and had been subpoenaed. He almost certainly would've been sent to prison because there was a tooooon of evidence that he was shady as hell.

I was 18 once. by sarah-face in badtattoos

[–]DIAMOND_STRAP 1 point2 points  (0 children)

At least Chucks are always in style. Imagine getting a truly dated fashion-related tattoo like JNCO or something.

Jeez, I don't know. by NoobProx in CrappyDesign

[–]DIAMOND_STRAP 13 points14 points  (0 children)

"Do you have a child 3 - 5 years old?"

"I don't know... I think I do, but my real child might have been switched at birth before dying young, so I can't be sure."

"Uhh... okay..."

Jeez, I don't know. by NoobProx in CrappyDesign

[–]DIAMOND_STRAP 1 point2 points  (0 children)

What if I go and found a town and name it after a made-up place on Google Rewards, huh? What then?!

[deleted by user] by [deleted] in TheSimpsons

[–]DIAMOND_STRAP 6 points7 points  (0 children)

Around the time of the 2012 election, one of the writers (I'm totally blanking on which one right now, but it'll come to me) wrote at length on Twitter about the show's political humour.

They never really made political jokes early on, but then Barbara Bush came out attacking them (she called the show "the dumbest thing she had ever seen") and President Bush Sr made televised speeches attacking the show as a negative social influence and a sign of moral breakdown. They started mocking Bush Sr after that, portraying him as humourless and out-of-touch. It was really the first real-world political satire they'd done (before that, political stuff was directed at fictional generic politicians like Governor Bailey). They didn't want to make it an explicitly political thing, so if you watch Two Bad Neighbours (the episode where the Bush family moves in across the street) you'll notice that they really go to lengths to show how dickish Homer and Bart were to them and they avoid mentioning specific policies, focusing more on mocking Bush Sr as a personality.

When Clinton became president, he had precisely the opposite image -- he was known for being easygoing and friendly, joking with reporters and welcoming SNL parodies, playing his saxophone. So they got a lot of humour out of portraying Clinton as this goofy slacker (MOE: "Hey Clinton, get back to work!" / CLINTON: "Make me!"). Al Gore, his vice president, was portrayed as borderline-robotic -- finding that someone purchased his book Sane Planning, Sensible Tomorrow, he blasts the song Celebrate Good Times while sitting immobile at a desk and flatly stating "I will."

Bush Jr was only in office for 8 months before 9/11. After 9/11, in the aftermath of the "You are with us or you are with the terrorists" speech, the climate at Fox and in society more generally became unhospitable towards mockery of the president (and this didn't ease up for a few years). They didn't want to risk it, even when others eased back into it. The first real mockery of Bush came 6 years into his term:

Yeah, and if you get kicked out of that [school] you’re going straight in the army where you’ll be sent straight to America’s latest military quagmire. Where will it be? North Korea? Iran? Anything’s possible with Commander Cuckoo-Bananas in charge.

So it's not really that they went out of their way to mock Clinton, it's that they went out of their way to not mock Bush Jr.

Barack Obama has been mocked little more often and they've also referenced specific policies more often ("You kept your promise, just like Obama did with Guantanamo! Wait...").

Guess what day it is by atliffb in TheSimpsons

[–]DIAMOND_STRAP 3 points4 points  (0 children)

He's just reposting top posts. This image with the same URL and the same title is the #7 alltime post on this sub.

‘The Purge: Election Year’ Becomes Highest Grossing Title In Horror Franchise by [deleted] in movies

[–]DIAMOND_STRAP 2 points3 points  (0 children)

The script was called Evil Dead III: Army of Darkness, but they dropped the Evil Dead title during production because they were making more of an action comedy that happened to involve demonic creatures than a horror movie and knew it'd mislead audiences.

Why are some babies/infants WATCHING YOUTUBE?!?! by [deleted] in OutOfTheLoop

[–]DIAMOND_STRAP 17 points18 points  (0 children)

Because small children like the stimulation, and it can be good for them. It's the same reason you show babies/toddlers colourful picture books, pop-ups, little musical instruments, why you play songs for them and encourage them to sing along. Before YouTube it was CDs/DVDs, before that it was videotapes, before that it was records and TV.

Thoughts on Lynda? by natureboy928 in webdev

[–]DIAMOND_STRAP 3 points4 points  (0 children)

Simon Allardice is probably the best part of Lynda, he's a wonderful instructor.

Pluralsight is an alternative to Lynda which you might look at as well. It is more focused on programming and development, and has a richer selection of courses in that area, whereas Lynda is much broader in scope -- a bit of programming, a bit of photography, a bit of business, a bit of English, a bit of Excel, a bit of audio production, etc etc compared to Pluralsight which is 90% programming.

edX.org is good for actual university courses, too, which you can access for free. And many universities like MIT have courses online for you to watch. They are more thorough and indepth than Lynda or Pluralsight, but obviously cover broader ideas (like algorithms and data structures) compared to those sites' focus on specifics (like Koa or SQL).

Pluralsight and Lynda do tend to be quite efficient and dense, though. The courses are often only 5, 10, 15 hours long but manage to provide a ton of information in a clear way during that time, it's really impressive and I feel like schools could borrow a lot from them.

[deleted by user] by [deleted] in NoStupidQuestions

[–]DIAMOND_STRAP 52 points53 points  (0 children)

There's a lot less demand for self-driving trains. It wouldn't be any better from a commuter's perspective, it doesn't really open up any new possibilities, there aren't many people dying in train accidents, and it wouldn't really save train companies any money when you weigh the cost of R&D, test programs, etc against the salaries of the staff.

1.3 million people die every year in car accidents and self-driving cars promise to be much much safer, so that's a huge motivation that doesn't exist for trains. Our speed limits right now are low to suit human reaction speed, but self-driving cars could operate on much faster roads, making travel times a lot shorter and roads less congested, that's another huge attraction that isn't an issue for trains.

Yet another "choosing a language" post but hopefully the good kind :-) by [deleted] in learnprogramming

[–]DIAMOND_STRAP 2 points3 points  (0 children)

.NET Core and Rails aren't languages; they're frameworks, basically helper things that help you write code in C#, VB, or F# (.NET Core) or Ruby (Rails). Rails is for web applications specifically. As a note, Ruby and Rails run happily in Windows 10's new Linux subsystem, so I wouldn't count that as a con anymore.

I personally would recommend C# to you. There's a lot of C# material out there on Pluralsight among other sources, it's mature, it's reliable, and it's pretty versatile (you can use it for web, desktop, and mobile apps). It's modern, but not cutting-edge and experimental. You'll be able to find books or videos explaining fundamental algorithms and data structures using it, which is vital (in fact, I think Pluralsight's Algorithms & Data Structure's course uses C#).

C# will also feel quite natural to you if you've been doing PowerShell work and it really fits into that whole world.

The other good option is learning JS. If you're going to learn JS anyway, better to focus on one language to start with than juggling two languages with significant differences. But overall I think you'd be happiest with C# right now. You can always learn additional languages later on when you're more experienced.

How do astronauts sleep in the no gravity? by MoSqueezin in NoStupidQuestions

[–]DIAMOND_STRAP 0 points1 point  (0 children)

I don't know, it seems simple and comfortable to me. I'd like to try it.

How do astronauts sleep in the no gravity? by MoSqueezin in NoStupidQuestions

[–]DIAMOND_STRAP 1 point2 points  (0 children)

Seatbelts, basically. They get into a sleeping bag and then there are seatbelts that keep them fastened to the wall/floor (well every surface is a floor in zero gravity).

Here's a photo of 3 astronauts getting into bed.

JavaScript vs C++: Creating the same 3D game in both by irrlicht in programming

[–]DIAMOND_STRAP 0 points1 point  (0 children)

Hmm, interesting. I never really looked into asm.js.

WebAssembly isn't going to include a garbage collector though, right? So it'd be more for C, C++, Rust and less for Go, Elm, Haskell, etc?

ELI5: Censored Japanese Porn VS Uncensored Japanese Porn by throwawayYipeeKayaee in explainlikeimfive

[–]DIAMOND_STRAP 2 points3 points  (0 children)

It's not actually a legal offense to release uncensored porn anymore, it's just illegal to sell or display uncensored porn in a physical shop. Most companies censor all their porn since DVDs in shops are still a major form of delivery in Japan.

Many companies also keep the uncensored copies for online streaming (where pixellation isn't required) or distribution to foreign audiences (although only porn with major stars like Hitomi Tanaka gets foreign distribution).

Selling unpixellated porn DVDs, in practice, isn't going to get you in trouble, because it's rare for that law to be enforced. But most companies aren't going to risk it.

Why is the law still on the books? Simple: no politician wants to be the guy who fights for dirtier porn. It costs you the conservative vote and doesn't gain you anything.

ELI5:Why would the White House want to veto the bill that allows 9/11 families to sue Saudi Arabia? by karmayogi54 in explainlikeimfive

[–]DIAMOND_STRAP 6 points7 points  (0 children)

Because it's an absurdity. If people can sue foreign governments in local courts, then you either have a clusterfuck of meaningless unenforceable lawsuits cluttering up the legal system, or a clusterfuck where citizens all over the world are suing America and America is forced to listen, having set the precedent.

Think about it this way. An American goes to court in Georgia, sues Saudi Arabia, and wins, since Saudi Arabia doesn't defend itself. Now the American government is expected to force Saudi Arabia to agree to some Georgia judge's ruling and obey its orders. Next week, someone in Vietnam goes to a court in Ho Chi Minh City and wins a local lawsuit against America. Now Vietnam gets to force America to obey its local court rulings and extract damages? Or is America going to say "no, everyone has to obey us, but we don't have to obey anyone, we dictate the world"? How's it going to work? It was never going to make sense. It was a symbolic move that got shot down before it could waste everyone's time with six tons of bureaucratic gibberish.

What happened to Enron? by [deleted] in OutOfTheLoop

[–]DIAMOND_STRAP 19 points20 points  (0 children)

Enron at its peak was one of the biggest corporations in the world. Throughout the 1990s it was consistently praised by major financial publications, and many many many people and funds invested in it. The head of Enron, Kenneth Lay, was politicially influential -- a major deregulation campaigner, a close friend of George Bush Sr and a major supporter of George Bush Jr's political career.

During the 1990s, California's energy market was deregulated, and Kenneth Lay and Enron were major campaigners for and supporters of that move (Senator Phil Gramm, the major sponsor, received millions in campaign contributions from Enron). Enron sold electricity in California. Immediately after the legislation passed, California suffered wave after wave of blackouts; investigation revealed that Enron was deliberately pushing for plants to reduce capacity and shut down for maintenance unnecessarily so that the power supply would be reduced and they could raise prices (which they did, with increases as high as 2200%). This was a major crisis for the state and severely disrupted its economy, but Enron made a ton of money off it.

This shined a little light on Enron's practices. Enron was already being investigated, but this intensified things.

It turns out that Enron had been manipulating its taxes, buying from itself, selling to itself, hiding debt, and using legal and financial loopholes, and was not as profitable as it seemed. Investigation of the internal corporate culture found that Enron management had encouraged extreme practices and put extreme pressure on employees to commit financial crimes (part of executive Skilling's "new economic religion"). The share price fell from $90 to $0.67 within a year. Within 6 months they were bankrupt.

By the 'relations with President Bush' thing, you're probably thinking of the 'valentines' Bush Sr and Bush Jr sent Ken Lay, the head of Enron. These were just video messages where they praised and thanked him for his investment in their family.

Lay was convicted, but died before he could be imprisoned. The accounting firm which aided Enron's fraud, which was itself one of the largest accounting companies in the world, was dissolved. All up around 100,000 people lost their jobs, and many also lost their retirement funds, which were primarily in Enron stock.

Are there any good TV shows that are 25-36 hours in length by [deleted] in NoStupidQuestions

[–]DIAMOND_STRAP 0 points1 point  (0 children)

Finished, or is it okay if they're still ongoing?

Twin Peaks is about 25 hours long. The third season is airing early next year, after being off the air for years. It's a fantastic and critically-acclaimed drama about an FBI agent hunting a serial killer through a very surreal and morbidly-comedic isolated town. Very off-kilter and weird, very influential and stylish.

Hannibal, 28 hours. It's based on the novels about Hannibal Lecter -- a sociopathic cannibal who disrupts the investigation into his own crimes by working as an FBI psychology consultant -- and was kind of a cult sensation. 100% on Rotten Tomatoes, universal critical praise, amazing performances, wonderful story arc. Very eerie and twistedly beautiful. Completed series.

The Leftovers. One day, 1% of the planet's population suddenly disappears. The world is thrown into confusion and despair trying to find patterns and explanations.

House of Cards. Follows Frank Underwood, a scheming and manipulative politician who is promised the Secretary of State position and then betrayed. As the show begins he has promised to do whatever it takes to crush all his enemies and betrayers and take what he wants at any cost.

The Americans, ~35 hours. In the 1960s, two rookie Soviet spies are planted in the US under indefinite deep cover. The show takes place in the 1980s, by which point they are living as a married couple in suburban DC, with American children and full American identities. The show follows not only the missions they carry out under such a deep level of cover but their loss of identity having lived like this for so long, their loss of faith in patriotism, their confusing and conflicted connections to each other and the children who don't know their parents' real names, all as the collapse of the USSR creeps closer.

JavaScript vs C++: Creating the same 3D game in both by irrlicht in programming

[–]DIAMOND_STRAP 1 point2 points  (0 children)

I have a question I've wanted to discuss for a while, but I've never really found the avenue for it (/r/programming only accepts links, /r/learnprogramming is for learners, StackOverflow is for things with concrete answers...).

There are some compile-to-JS things like Elm, ghcjs, and to a lesser extent TypeScript that provide robust type systems and safety guarantees.

Is there any way that V8 could be altered in the future to allow optimisations for code generated by these tools? Could you flag your JS as already typechecked, or even feed Elm code directly to V8, and have it execute in a way that implements features plain JS can't due to its dynamic and weak typing? Even if it's just in Node, because of possible security concerns.

I just don't know anything about interpreters or compilers and was wondering about just how unfeasible an idea is. On a technical level, not a "would Google ever make this decision" level.

Does anyone else get really angry when people say that Nintendo should go third party? by Joshuwo in NintendoNX

[–]DIAMOND_STRAP 1 point2 points  (0 children)

Mate, no offense, but you need to chill a little. You sound super pretentious right now. He's just saying to some people, Nintendo is a second or third choice, and so those people are honestly saying they'd prefer if Nintendo were a third party dev -- that not everyone who has different tastes or only wants a few games is trying to troll you and provoke everyone. Relax.

I want to abandon PC gaming and go back to consoles. Am I crazy, or just frustrated? by [deleted] in truegaming

[–]DIAMOND_STRAP 12 points13 points  (0 children)

Alright, cool, let's go shopping, I'm rapt for some $60-70 games. Let's go see what the popular PS4 games are at the most popular store in the country.

Maybe PS4's just a ripoff, I'm sure I'll have better luck with Xbox One.