Better HN
topnewbestaskshowjobs
Log inSign up

codedrome

49 karma · joined Jul 12, 2019 (7y ago) · 55 submissions

Submissions

31.

Seven Segment Display in JavaScript(codedrome.com ↗)

1 points · by codedrome · 6y ago · discuss

comment 7y ago · link · parent

Anybody interested in astronomy will be familiar with Arabic science and mathematics during what in Europe was the Dark Ages, for example many star names are Arabic, but for most people in the west it is completely unknown.

comment 7y ago · link · parent

Strangely, I don't know! Everyone I know might be regular Twitter users but I don't think I have ever discussed it with anyone. I have never told anyone I know that I use Twitter, and vice versa. I hadn't thought about it before but it seems strange now.

comment 7y ago · link · parent

I agree with gus_massa about Python as it is probably the simplest mainstream language but in recent years has moved way beyond being a toy/educational language to major commercial use. Try building something "real" like a simple program to store details of your DVD collection, a calendar/diary or whatever. Most importantly forget about being 60. It's irrelevant.

35.

Exporting PostgreSQL Data to Excel with Python(codedrome.com ↗)

2 points · by codedrome · 7y ago · discuss

36.

Exploring Matrices in Python(codedrome.com ↗)

2 points · by codedrome · 7y ago · discuss

37.

Martian Gravity: An Exploration in Python(codedrome.com ↗)

2 points · by codedrome · 7y ago · discuss

38.

Polar Plots in Python(codedrome.com ↗)

1 points · by codedrome · 7y ago · discuss

comment 7y ago · link · parent

I've got a book called Building Django 2.0 We Applications published by Packt. It consists of several different complete solutions, the first and main one being a simple IMDB type site.

40.

Creating a PostgreSQL Database in Python(codedrome.com ↗)

1 points · by codedrome · 7y ago · discuss

41.

Exploring the Visible Spectrum in Python(codedrome.com ↗)

56 points · by codedrome · 7y ago · 24 comments

comment 7y ago · link · parent

I think the controversy and confusion about functional programming stems from the difference between procedural and OOP programming. The switch from procedural to OOP which occurred in the 1990s was basically all or nothing - with the languages of the time, mostly C++, it was a full paradigm shift.

People probably assume it's the same with FP, ie you have to do EVERYTHING as FP whereas in fact with current mainstream languages (eg JS, C#) you can just drop in bits of FP whenever you feel it is appropriate. It's a tool in the toolbox, not the entire toolbox.

comment 7y ago · link · parent

That is a very clear and concise description, with obvious applications to algorithms. It might also be worth adding logarithmic plots, for example plotting data on an equally spaced scale of 1, 10, 100, 1000 etc. Also some units are logarithmic, for example bels (more familiar in their tenths as decibels) and the Richter scale used for earthquakes.

comment 7y ago · link · parent

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.

comment 7y ago · link · parent

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.

46.

Pearson Correlation in Python(codedrome.com ↗)

1 points · by codedrome · 7y ago · discuss

47.

Estimating Pi in Python(codedrome.com ↗)

3 points · by codedrome · 7y ago · discuss

comment 7y ago · link · parent

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?

comment 7y ago · link · parent

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.

comment 7y ago · link · parent

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.

comment 7y ago · link · parent

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.

comment 7y ago · link · parent

A slightly amusing side effect is that the app shows you as having -1 followers and following -1 people.

comment 7y ago · link · parent

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.

comment 7y ago · link · parent

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.

55.

Creating a PostgreSQL Database in C(codedrome.com ↗)

2 points · by codedrome · 7y ago · 3 comments

12