HN user

Paddy3118

8 karma

paddy3118.blogspot.com

Posts5
Comments31
View on HN

I originally used Guttenburgh to get Hamlet and coded the Quanta method in Python and it did not work. I then moved to Algorithm 1 in the paper and got Copilot to (mis) convert it to Python and then spent time getting Copilot to admit its mistakes. The resultant code seemed to work but I found the Quanta suggested data of the words of hamlet to be uninspiring as for the calculated theta (max set size before halving), was often from ~50% of the total number of words in hamlet to often more than the words in hamlet. I've yet to investigate theta in more depth...

Python is a scripting language. It allows me to develop a right answer in record devopment time and with a high degree of confidence that the result does what it needs to do. If, then, there are speed problems then I can optimise my existing code or rewrite sections in other languages, but crucially use my initial code to aid in testing the more obscure rewrites. Most of the time, some thought upfront will tell you if you will need a compiled solution early on, but even then - getting it correct in Python before getting it fast in something like C++ can be faster - the spec is often revised as implementation can change specsand Python is more agile.

Execution speed is more than execution speed - you need to be correct, and being fast enough is quality; faster may be wasteful.

"People don't use...". They did and they will and you will have to read and understand and maintain that cruft for years to come.

Lingua franca "language used as a means of communication between populations speaking vernaculars that are not mutually intelligible." Javascript is too Web focused. Python and C are better candidates as they are more than Web.

Code is helped by being readable.

Saying your code is going to "look like sh£t anyway" seems rather defeatist, and an _excuse_ to write unreadable code.

Oh my blog isn't giving an analytical solution, if that is what you want to do, it is simulating the problem to find a solution.

(The video does do an analytical solution though).

By abstraction, the author mentions interfaces earlier on. I take the point of the other commenter who states that Java practitioners use too much abstraction, and would also point out that the later versions of Python add abstract base classes: http://docs.python.org/library/abc.html

After comparing Java and Python solutions on Rosetta Code: http://rosettacode.org/ I think new programmers would find it easier to learn when using Python.

- Paddy.

Um, not really. Dynamic languages have duck typing (look it up on wikipedia); they get used to writing for the now and letting the what-ifs wait, as in some cases, changes can be accomodated with little tear-down of existing code.

Just a reminder after some of the comments directly after the Beijing Olympics: Bolt is tested to death and is clean. As where those 100m female runners who swept away all the medals: Shelly-Ann Fraser, Sherone Simpson, and Kerron Stewart.

There is one thing that was shoddy though, with a bit more effort the ladies could have got equal times and picked up three golds in the race instead of one gold and two silvers :-)

- Paddy.

To rip out a little of the reply by tetha above:

"If you have duck typing, the programmer needs to do this work, by defining clear interfaces with clear documentations about the expected behavior of an object passed in here or returned over there."

A compiler does not define clear interfaces with clear documentation for you. If you are implying that to use duck typing, this is more likely to be done by a programmer then this is a good thing; no matter what the typing.

In practice duck typing helps to get rid of needless duplication, and extended class hierarchies in code, and proponents would state that less code is easier to verify.

- Paddy.

Python, popular!!! that is just so great! I've watched it grow for over a decade and a half. Python got were it is, largely without the big initial push of large companies.

Maybe people now blog about python because the community has always tried to be friendly. It is usually nice to blog about Python, and have fellow enthusiasts give measured, polite feedback.

"... so it follows that the languages where you can get paid and not care are going to be most popular."

But it does not follow that there are less caring, articulate, and productive souls in a more popular languages camp.

- Paddy.

I am an active contributor to www.RosettaCode.org where I browse many languages. What I have seen of the functional languages doesn't make me want to switch.

Despite knowing Pythons functional tools, it wasn't Python that introduced me to that style. I find Pythons mix comfortable and happily switch between programming in Python 3 and Python 2. Maybe the OP hopes to start a trend?

- Paddy.