A Hundred Days of Code, Day 026 - Refactoring

Worked only an hour today. Trying to change the little lookup program, I made the other day, into something a little better. Not quite a good day. Calling it quits early.

August 3, 2020 · Mario Jason Braganza

A Hundred Days of Code, Day 025 - Comprehension Exercises

Working on Comprehension exercises today. Reflections and Experience I really need feedback, when it comes to programming. I cannot face a blank page. I always seem to start with printing something out to screen and then my brain kind of kicks into gear. Everything after that is just type, print, is this what I expected, if not then fix, type, print … Exercise 3.1 and I think, I am finally getting good handle on comprehensions....

August 3, 2020 · Mario Jason Braganza

A Hundred Days of Code, Day 023, Day 24 - Tiny Utility to do comparative DNS Lookups

Problem - Compare domain lookups, against DoH Servers Take a list of domains (one per line) from a text file as input, find the IP address for the domain using the standard system level DNS, and then check against DoH answers from both cloudflare and google. and say if all answers match properly or not. Notes What do I need to do? (checklist) Get a list of popular websites, (probably Alexa) figure out a way to read them in loop through each line, and look up its ip with the local dns (use the sockets module) with Google’s DoH json endpoint (use the requests module) with Cloudflare’s DoH json endpoint (ditto like Google) Compare all the values....

August 1, 2020 · Mario Jason Braganza

A Hundred Days of Code, Day 022 - Getting into the Groove

Did the same time as yesterday. Only about an hour. Was much more prodcutive though. Getting the hang of how to sit and program and work through things I do not know. Gaining a bit of experience with the workflow now. I have the basics in hand. I know what I want to look up. So check problem, work a bit, look up, try, fail, repeat, gain incremental success, work some more....

July 30, 2020 · Mario Jason Braganza

A Hundred Days of Code, Day 021 - Swing and a miss

Only did about an hour of distracted work and exercises today. I’ll still count it though. Tomorrow is another day :)

July 29, 2020 · Mario Jason Braganza

A Hundred Days of Code, Day 020 - Setting up an Editor for Python Development

Had given myself a day, to see if I could get a good Python development environment using Elpy and Emacs. It does work. Just not well enough for me. At the end of the day today, I was happy I learnt so much about Emacs. But that is not my focus right now. Python is. Emacs knowledge can come slowly and organically. So I have kept Emacs as my regular editor for nearly everything text....

July 28, 2020 · Mario Jason Braganza

A Hundred Days of Code, Day 019 - Future Exercise Addendum

Ok, think I have the problem of writing code, licked. Will start with one problem from all the Lerner Courses, that I still have to do. And another problem, I ask my friends to give me. This should prove for a promising start. If you, dear reader, have problems in Python that you’d like me, a budding Python programmer to solve, please mail them to me at jason at this domain....

July 27, 2020 · Mario Jason Braganza

A Hundred Days of Code, Day 019 - Python Iterators and Generators, Done!

Starting up with the last of the Lerner courses, I got. Iterators and Generators. Hopefully I get done with this and use the same intensity with actually writing code. What shape will that take and how will I write about it? I have no clue For now, notes follow. Notes ** Part 1, Iterators ** If we run the iter function on something and it comes back with an iterator object, then it’s iterable; I can iterate on it....

July 27, 2020 · Mario Jason Braganza

A Hundred Days of Code, Day 018 - Python Comprehensions, Done!

Continuing my comprehensions journey. Hopefully it makes more sense this time around Notes ** Set Comprehensions ** If I want a set of uniques from a group, I could use a set. Or like Reuven likes to joke, a set is a dictionary with no values; an immoral dictionary 😂 Create it with a somesetcomp = set('somecondition' for a something in somethingbig) or in a simpler manner, somesetcomp = {'somecondition' for something in somethingbig} Protip, better to start with a list comprehension, be done with figuring out stuff and then just switch the brackets at the end....

July 26, 2020 · Mario Jason Braganza

A Hundred Days of Code, Day 017 - Python, Advanced Objects, Done!

And we are done with objects! This course finally gave me what I was looking for all these months. The ability to think of and reason about Python, so that I can then think of and reason about, how to build my own programs. Notes Abstract base classes Sounds all high and mighty, but does something pretty logical and simple Helps me test if my object is of a generic (of sorts) type....

July 25, 2020 · Mario Jason Braganza