18:52 2018-06-21
- As you may know, I have been working on my "Refcards-System" for years now. I haven't made much progress, but I still have made some progress;
- This latest iteration is all about "writing" to a .csv file; the idea is that a .csv file can be "imported" into a relational database or else opened up as an "Excel" file, making it rather interoperable;
- So what we have is simple. First I create the "filename" using some magical "time" module tricks. I want the filename to basically be the current timestamp, + the .csv file ending;
- Then basically I create the first "row" which are the "fieldnames" in the .csv file, and then I write the second "row" which is my content;
- Notice that I am using "raw_input", in Python that allows me to enter text directly into the file, with a prompt;
- The point is really to have content in .csv format, which is portable, interoperable, and lightweight as well. It's also a format that has withstood the test of time.
Thursday, June 21, 2018
Sunday, March 11, 2018
Idiomatic Random Thoughts
I've been practicing my Python again. I am working on a Python version of an old boardgame called Stock Ticker. I had a breakthrough after thinking about it for 2 years. Right now, though, I'm just goofing off. This is imaginary code for the use of a random_thoughts module.
I've been watching videos of Python masters teaching their great wisdom. Of note is the work of Raymond Hettinger. I've learned a lot from watching him talk about writing beautiful Python code. I am only 7 years or so into my Python practice, so I'm not yet an expert. I am entering into the "intermediary" territory, though, because I can read almost any Python code and pretty much know what it's doing, and I can write code to solve problems I encounter every day. I still can't write a packaged app, a full-blown executable, with interface and everything. But I am beginning to truly understand Python, which is still a big accomplishment for me.
My dream is to think Pythonic thoughts. I want to turn my thoughts into mathematical expressions, and be able to execute them using Python as a programming language. Hence the thought experiment on the random_thoughts module. It's not really good Python code, but it's a start. The idea is that there would be a function I could use to turn my thoughts directly into idiomatic Python.
I've been watching videos of Python masters teaching their great wisdom. Of note is the work of Raymond Hettinger. I've learned a lot from watching him talk about writing beautiful Python code. I am only 7 years or so into my Python practice, so I'm not yet an expert. I am entering into the "intermediary" territory, though, because I can read almost any Python code and pretty much know what it's doing, and I can write code to solve problems I encounter every day. I still can't write a packaged app, a full-blown executable, with interface and everything. But I am beginning to truly understand Python, which is still a big accomplishment for me.
My dream is to think Pythonic thoughts. I want to turn my thoughts into mathematical expressions, and be able to execute them using Python as a programming language. Hence the thought experiment on the random_thoughts module. It's not really good Python code, but it's a start. The idea is that there would be a function I could use to turn my thoughts directly into idiomatic Python.
Subscribe to:
Comments (Atom)