HNHacker News
TopNewBestAskShowJobs

codedrome

49 karma · joined July 12, 2019

submissionscomments
codedrome··on Viral math problem solution dividing the internet
I got the impression that whoever posted this originally created it as a sort of puzzle or mathematics test, or to illustrate varying precedence over time. I doubt if anybody is still alive from the time when BODMAS/PEMDAS wasn't universal so for practical modern purposes the equation is not ambiguous. In fact it isn't possible to write an ambiguous (valid) equation.
codedrome··on Viral math problem solution dividing the internet
In UK schools we are taught BODMAS: Brackets Of (as in "to the power of") Divide and Multiply Add and Subtract

In the US they say PEMDAS (P and E being parentheses and exponent respectively). No doubt other countries use something equivalent.

If you apply this rule you will get the right answer, as long as you also remember to carry out operations with the same precedence left-to-right.

codedrome··on Maps Reveal the Difference in How Cities Are Perceived by Tourists and Locals
It says "The red dots indicate photographs taken by tourists, while the blue dots show images taken by local residents" but what is the orange?
codedrome··on Why are there so many JavaScript frameworks?
Unlike many pieces of software the shortcomings of JavaScript frameworks are obvious and numerous. Frankly they aren't very good.

Large numbers of people using them are going to think "I could do better myself" and some of them actually do.

codedrome··on Why doesn't Google maps have routes for tsunami/volcano evacuation
I think the most likely explanation is that they never thought of it.

Are there official routes designated by local/state/federal government? If so maybe you could contact the relevant authority and ask them to ask Google to add them.

Google maps often has topical information, eg road closures, so it's obviously dynamic rather than just an online equivalent of a paper map. The technology therefore exists to do what you suggest.

codedrome··on Ask HN: Do you prefer reading or listening?
I assume you are referring to audiobooks?

Definitely reading as it enables you to go at your own pace, skip back a few words if you didn't catch a meaning, or stop and stare out of the window for a few seconds.

Also the reader of an audiobook imposes their own interpretation of the text whereas if you read there is nothing between you and the author.

You can sort of do these things with an audiobook but it's fiddly.

codedrome··on Twitter is down
A slightly amusing side effect is that the app shows you as having -1 followers and following -1 people.
codedrome··on Constructive mathematics and computer programming (1979) [pdf]
Thanks, I'll copy this to my tablet so I can carry it around with me.

Looking forward to being impressed (hopefully) that it is still relevant today.

codedrome··on Creating a PostgreSQL Database in C
That's a good point; the use cases for this are rare and specialized. If you have written software in C with a database backend which is to be distributed to third parties you'll need to provide a setup program which not only installs the software but also creates the database. You might wish to do this in C as well, although a scripting language like Python might be a better choice.

Another possible scenario is if you need to create some sort of DBA GUI along the lines of pgAdmin, either because you have specialist requirements, just as a programming exercise, or because you think you can do better!

However, the main purpose of this article is as a lead-in to further articles on CRUD which has obvious and widespread uses.

The article provides a simple introduction to the subject, as well as creating the database schema which I'll use for future articles.

To answer your question "Would it be as an alternative to using SQLite as a library?", PostgreSQL is an industrial strength RDBMS which can hold its own against SQL Server and Oracle in a client/server environment so you wouldn't use it for standalone applications.

← PreviousPage 2 of 2