littlelogs

Keep a social journal of your work progress as you make and learn things.

#python

February 2017

josh
josh

Did a bit more work porting rply to #go this afternoon. Now I’m into building the parser things are getting tricky. #Rply is also barely commented at all so it’s often hard to follow. Also because #python is dynamic, there are no types for anything! So I have to be the human type inferrer. It’s been a bit frustrating working out what type a variable is (or what a dictionary holds) when I can’t see the raw values going in.

October 2016

josh
josh

Well, my #exist upgrade is complete. The site was offline for a little over an hour, a bit longer than I intended thanks to some things I missed in my pre-flight checklist and which subsequently made things very confusing, but not too bad really. I had a few little bugs to fix afterwards that I’d missed earlier, but it all seems good now. Onward to new event streams and #manualtracking!

Sort of related, I’d definitely have fewer issues in a scenario like this with a strongly typed language. I think upgrading to #python 3 would be at least as stressful as this upgrade has been, but it would mean I could take advantage of type hinting. Something to ponder.

August 2016

belle
belle

Forgot to log yesterday! I did a lot of coding for a change. Here’s what I got done on #exist for #ios:

  • Added a message to the settings screen that asks the user not to force quit, as that stops background refresh from running
  • Added support for a food group and all its attributes, which will be launched soon
  • Submitted nutrition update to App Store for review
  • Put back the #location code I was working on months ago and started testing it

I also started working on a just-for-fun app to send my Wunderlist tasks to Exist. It would make much more sense as a #python script or something, but iOS is all I know 😏

June 2016

May 2016

peter
peter

It took all day, but I installed #django on a #vagrant box and then finally managed to create a home page view with a template.

I had some application code from a number of years ago to use as example code, but it was seriously out of date. Nothing like starting from scratch and having to give in and read the docs.

Feeling like such a #python #newbie, but will battle on :)

josh
josh

This weekend I’ve been tinkering with #braid some more. I found a very useful implementation of the Hindley-Milner algorithm in #python so I’ve taken that and built on it, incorporating it into my compilation as a new type-checking stage. It’s been mostly successful so far! I can remove all type annotations and let the compiler infer function and variable types, and then use those types in the #llvm IR-generation stage. Pretty happy with that.

peter
peter

Finally starting to teach myself #python

While I enjoy coding for the web, my long term ambition is to become what’s known as a real-world software developer (someone that programs for physical devices, such as robots), and learning python is a good stepping stone towards this.

josh
josh

The last few days I’ve been trialling various #python IDEs. I use Komodo at the moment, which I quite like, but I’m tiring of it telling me “error occurred, no completions found” maybe half the time I try to use the code completions. I’ve crossed Visual Studio and Eclipse off the list of other options. PyCharm is a contender, except it’s a massive CPU and disk hog, and there are some other little niggles. Not sure what I’ll ultimately choose.

In more constructive news I’ve been writing a small update to #exist for #android to show the user’s mood note from this day last year, if they have one. I’ve missed that feature from the nightly email.

josh
josh

Today and yesterday I spent a little time getting #llvm working with #python, and (sort of) revived #braid, my toy language project. My new goal is to compile my AST into LLVM IR which can then be compiled into a binary. Today this meant adding some type annotations because LLVM IR is strongly typed and I’d like Braid to be also.

I’ve given up using #rpython this time, which is such a relief, but obviously Python is not the best language to write a language in, speed-wise if nothing else… however, it is just for fun and to learn, so it doesn’t really matter, I think. If I really do keep at it, I can always rewrite it in something else, or use the first Braid compiler to write a new Braid compiler in Braid (bootstrapping!). We’ll see.

April 2016

josh
josh

Spent the afternoon setting up #exist’s new attributes and some basic insights for each. Just need to add the insight templates to the database and I can deploy this lot of changes and tick this card off on our Trello roadmap. I probably would’ve got it all done today, but I went for a long walk down along the creek after the rain stopped, and various things stopped me from getting back into it when I got home.

Later after dinner I worked on #larder for a break and tweaked some onboarding stuff, set up the Campaign Monitor integration (some kind soul has made a #Python-3-compatible API client fork), and started thinking about the #Chrome extension.

Also had a look at some Larder user stats. Disappointed to see a bunch of beta testers never added a single bookmark and still had the gall to fill in the survey! 😒

February 2016

January 2016

loudmouthman
loudmouthman

#RaspberryPi #python The Raspberry Pi challenge project is all coming together the code work and the electronics pick up the sensor changes. Whats next is to get the kids identifying how to change assets in the game and how they are linked to files on the filesystem. I think this might need some video tutorials we can link to or at least something where the kids can spend longer and arrive with an actual structured lesson to work against. now.

loudmouthman
loudmouthman

#python #raspberrypi #pygamezero

So Pygame Zero exists to redress the imbalance in teaching python at school level and allowing code clubs to accelerate access to game coding ideas in classes. So what do I want to do when working through pygame zero documentation and not wanting to be out in my cold office. I forward Xwindows to my OSX machine and keep a terminal open for coding in python. I wonder if there are any nice shell IDEs for Python … who am I kidding its VIm or nothing for me.

ddbeck
ddbeck

I guess that prep yesterday paid off, because today was very productive.

For work, I spent a while writing an extension for Sphinx, the documentation generator I use. Ironically, Sphinx is somewhat poorly documented itself, like the proverbial cobbler’s children. The last few times I’ve worked on this extension, I ended up only reading Sphinx and docutils source to figure out what it was doing. Today, I finally had a breakthrough and started generating the output I wanted to see in the first place.

In the evening, I submitted my first conference talk proposal. I’m fully prepared for my proposal to be rejected, but I’m glad I’m making some concrete progress on my goal to eventually speak at a conference.

#docs #python #docutils #sphinx #cfp

belle
belle

Still finding things that need setting up on my new computer. Today it was #pelican, which I use for my blog. Turns out it wasn’t simple at all, so I had to ask @josh to help me figure out the #python issues, which eventually meant we had to set up a virtual environment for it. Also had some issues with the pelican settings, which didn’t like the way I was doing things (even though it worked fine on my old computer with the same pelican version).

Anyway. It’s up and running, and I have a link to my Productive Habits course in the sidebar now.

December 2015

Fouad
Fouad

just learned #ES6, lots of cool features from #python and #ruby made it in this version. Simi-colons and curly braces did not go anywhere though ^_^ ! I am just glad I don’t have to learn TypeScript or CoffeScript to use these features

ddbeck
ddbeck

For work, I did some tidying up of a script that helps me manage some contextual help text. Previously, the script verified the appearance of certain notices based on other UI strings—a fragile, “stringly typed” situation. Today, I updated the script to check on proper database fields. Not a lot of writing today, but it was nice to exercise my programming skills a little.

Oh yeah, that announcement #blog post I wrote is up. Linked as promised.

Today I also did my first review of a contribution from a Python Packaging User Guide volunteer. It’s been a while since I’ve been an editor, so I had to be very careful to distinguish, for myself and for the contributor, between how I would write something and how the writing can be improved. They’re not the same thing! Lousy editors don’t know the difference—even if their own writing is excellent—and I don’t want to be a lousy editor.

#docs #python #php #editing #writing

ddbeck
ddbeck

Today, I wrapped up a draft of a #blog post announcing the availability of #PHP 7 (I don’t think it’s been published yet, however). Aside from the voice issues I wrote about yesterday, it’s also hard to write about changes to a language I don’t actually use. I did learn a lot about PHP though. Ultimately, I wasn’t super satisfied with I wrote, but it’s not worth spending tons of time on on something that’s ultimately ephemeral.

In other news, I recently wrote a contributor guide for the #Python Packaging User Guide. Today, I notified some volunteers about ways to start contributing. I’m excited to start doing editing work with the volunteers!

ddbeck
ddbeck

Left this draft sitting here from last night. Whoops!

One of the things I did for work was to update some #docs that mentioned a configuration values for third-party service. The configuration values were out of date. It’s one of those things where those semantic web ideas would be nice to have in reality: instead of manually copying and pasting values from one doc into another, it’d be nice to just reference a portion of a page and have the tools take care of the rest.

After work, I went to my first Cambridge #Python meetup. It was a fun activity night, where we worked on the puzzles of the Python Challenge. People were quiet at first, but as we made progress it got livelier. I’m looking forward to the next one.

October 2015

josh
josh

Today I'm starting to look at how I can bring the current #exist codebase in line with the functionality I wanted out of the planned exist-core v2, rather than rewriting and being susceptible to the Second System Effect. This involves:

  • Migrating from #mysql to to #postgres
  • Adding the new event stream table with #json-b metadata field
  • Potentially migrating to #python 3 (perhaps relying on 2to3?)
  • Pruning away a lot of accumulated cruft that wouldn't have appeared in v2
  • Potentially open-sourcing the result

Right now I'm on the first step. I'm looking at using pgloader to migrate data into postgres. In the past I've run into issues migrating to postgres (and so quickly gave up) but I'm hoping pgloader will be my shining light.

josh
josh

In the meantime I've been researching game engines, because I have a small game idea I've been itching to prototype. Given I'm pretty comfortable with #python, I wanted to be able to use that. But most python game engines seem pretty outdated, or badly documented. I think I'll settle for PyGame, which doesn't seem very modern, but at least should be quick to get up to scratch with. I've also been looking at Kivy which is nice and modern, and well-documented, but more oriented towards general multimedia apps — I'm sure I could make it do game things, but I'd rather get up to speed more quickly with something more specific for now. Premature optimisation and all that.

kiriappeee
kiriappeee

Stayed up a little late last night researching into how to schedule jobs using #Python. Definitely going with a #Cron api. The inbuilt sched module looks nice but I can't deal with the headache of reproducing the monitoring functionality and stuff to ensure that threads that crash get restarted etc. That wheel's already been invented at an OS level.

September 2015

mrtwj
mrtwj

Going overboard with #php type hints. I'm not sure why more scripting languages don't make strict typing optional/mixable.

phouse512
phouse512

working on a pull request for a small open source #python library I use. Also learning about the synchronized type in #java and how it can be used to help with singletons and race conditions when using static members!

josh
josh

Just did some #exist #support that had me scratching my head — requests failing because the function didn't exist. Worked on dev, worked in command line on production. I'm still not even sure how it could've got out of sync, but it turns out deleting the #python .pyc file for the offending code fixed it. Grrrrr at you python.

kiriappeee
kiriappeee

Having a huge week so far. Started out horribly unproductive. Got an amazing contract Monday evening. Data scraping etc. Getting paid really well hopefully. Created a multi threaded #Python #Script running with #BeautifulSoup4 to start it up. Discovered that hosting it on Digital Ocean is a terrible idea (100% CPU usage the whole time). Spun up AWS EC2 instance for the first time in my life. Took 15 minutes and boom! Script was running 10k items every 10 minutes. What a great week so far :)

josh
josh

Having issues with #littlelogs private groups and dynamic databases. Basically I can't dynamically route queries to databases that haven't been predefined in settings, because django-dynamic-router seems to have threading issues (at least in my setup) and the selected database doesn't stick. A pretty fruitless day of work. Going to look at django-tenant-schemas and weigh up switching to #postgres versus some other alternative (maybe generating new DB setting files and restarting django to include them). Still very leery of keeping everyone in the one database (or schema).

josh
josh

Finished off my #client work today, grappling with #Django admin and trying to extend it to do stuff it isn't meant to do.

I stand by my opinion — do not use the Django admin to make a client-facing admin site, build your own. Or soon enough you will spend all your time working around it.

mattimck
mattimck

Got back into the guts of #curo's task and notifications systems, and worked on some changes to make the Activity feeds more useful and understandable for Carers. Grateful to #past #me that I bothered to write decent #tests for that section. Made troubleshooting so much easier as I broke things along the way.

kiriappeee
kiriappeee

~100 line method refactored into 7 methods that total about 94 lines. #Python . Much more readable and understandable now. Also discovered error in logic along the way.

josh
josh

Tonight I started a new branch implementing the ability to follow users in #littlelogs — they'll show up in your home tab like you'd expect from something like Twitter. It's almost ready to go, perhaps after some testing tomorrow. Considering the ability to follow specific tags also.

August 2015

Older