Skip to content

Commit cc41afc

Browse files
committed
[ phd-writeup ] Some bad, mostly good (I think)
"It's been a minute, huh Mav?"
1 parent 7dd2915 commit cc41afc

File tree

2 files changed

+158
-2
lines changed

2 files changed

+158
-2
lines changed

content/en/post/first-go-at-tildagon-development/index.md

Lines changed: 85 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,91 @@ development environment.
163163
`__init__.py` pointing to the right place.
164164
* LEDs seem to be indexed from 1, based on the examples out there. Corresponds
165165
to the labelling on the PCB.
166-
* Using the `ctx.arc` function causes a `TypeError`! That's exciting!
166+
* ~~Using the `ctx.arc` function causes a `TypeError`! That's exciting!~~
167+
- Update 2024-07-22: I suspect this was to do with some erroneous
168+
initialisation logic or referring to fields which I had commented out, and
169+
not the fault of the graphics API.
167170
* And I've clearly done something wrong: my timer logic causes the entire
168171
simulator to hang... ^^;;
169172
173+
174+
## Things learned the hard way (2024-07-12)
175+
176+
* This is micropython, occasionally I reach for things which simply aren't there
177+
- tuple(a + b for a,b in zip(self.tup1, self.tup2))
178+
* When there is a syntax error, undefined value, incompatible value/type,
179+
or unsupported syntax (ternary if, for example), simulator doesn't crash, it
180+
freezes entirely. Has to be force-quit either by Ctrl+C from the terminal,
181+
or sometimes the terminal locks up as well and the window manager has to
182+
kill it!
183+
184+
185+
## Developing the app
186+
187+
As can be seen from the notes above, there was a good amount of trial and error
188+
to get things going. However, now we (hopefully) know what to look for when
189+
certain crashes happen, and we can get on with making the actual app!
190+
191+
### Idea
192+
193+
My idea for an app was very practical and current-situation-minded: I need to
194+
write up my PhD and -- in keeping with traditions -- will do pretty much
195+
anything else on the side. Including developing a Pomodoro timer for the
196+
Tildagon! Perhaps a bit boring, but it ought to be simple enough to be a good
197+
first project on this new platform which I've never developed for before: I know
198+
_precisely_ how it is meant to work, there are few moving parts, and yet there
199+
is enough creative room for exploring different parts of the Tildagon's
200+
capabilities:
201+
202+
* There will be a simple internal state to manage: on break or not, and two time
203+
durations;
204+
* Displaying the remaining time should be simple enough (famous last words);
205+
* Figuring out some way to do time -- either via the `time` API or a rough
206+
guesstimate from the frequency of the `update` function -- ought to be
207+
doable as well;
208+
* The LEDs around the edge could be lit up in a colour depending on whether the
209+
user is on a break or in a focus/work session;
210+
* The LEDs could "count down" one second at a time, flashing in a circle around
211+
the board (or probably better to have it be subtle highlighting so as to not
212+
be too distracting);
213+
* The LEDs could also turn off once every twelfth of the countdown, making for a
214+
clear visual indicator (I really like this idea);
215+
* And for bonus points: a menu system for configuring the times and behaviour to
216+
the user's liking, which would involve using the button states.
217+
218+
Plenty of interesting little things to go around!
219+
220+
### Foundations
221+
222+
Going off the
223+
[hardware overview](https://tildagon.badge.emfcamp.org/tildagon-apps/reference/badge-hardware/)
224+
and the
225+
[graphics documentation](https://tildagon.badge.emfcamp.org/tildagon-apps/reference/ctx/),
226+
as well as the
227+
[Hello World app walkthrough](https://tildagon.badge.emfcamp.org/tildagon-apps/development/)
228+
I think we'll need at least the following:
229+
230+
```python
231+
import app
232+
233+
from app_components import clear_background
234+
from events.input import Buttons, BUTTON_TYPES
235+
from tildagonos import tildagonos
236+
from system.eventbus import eventbus
237+
from system.patterndisplay.events import *
238+
import time
239+
240+
241+
# Main app
242+
class Pomodoro(app.App):
243+
def __init__(self):
244+
self.button_states = Buttons(self)
245+
246+
# disable the default spinning pattern
247+
eventbus.emit(PatternDisable())
248+
```
249+
250+
### Lights!
251+
252+
253+

content/en/post/writing-up-a-phd/index.md

Lines changed: 73 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ authors: [thomas-e-hansen]
88
tags: [misc, phd, academia]
99
categories: [sapling]
1010
date: 2024-01-16
11-
lastmod: 2024-03-18
11+
lastmod: 2024-08-05
1212
featured: false
1313
draft: false
1414

@@ -368,3 +368,75 @@ have.
368368
Well, time to get back to it I guess. Until the next update, and thank you for
369369
reading along so far. Good luck!
370370

371+
372+
## 2024-08-05
373+
374+
It's been a while. I'm still alive.
375+
376+
The thesis bootcamp was a success: I managed to write over 5000 words in 3 days,
377+
which got me 2 Lego bricks (we had to set three writing goals, and every goal
378+
you made gave you a nicer lego brick; green, then blue, then gold/yellow). I
379+
didn't make it to my final one -- 10,000 words -- but I am still very happy with
380+
the amount I did get written. It might honestly just have been the different
381+
location, maybe the lab has become "friendly" after so long... But yes, it was
382+
good. I met some nice people, there was lots of commiseration, _unlimited free
383+
snacks_, and lunch was provided. A really great take-away that I got from it was
384+
to take a 45 minute break around 15:00. Sounds insane, but that's when most
385+
people are crashing anyhow, and it makes you much more productive for the -- now
386+
considerably shorter -- rest of the day (as showcased by everyone there doing
387+
it, and everyone there being more productive than they normally were). The
388+
person running the bootcamp was also fantastic to talk to, with lots of support
389+
and positivity when it was needed. Although we did have a chat at the end where
390+
they told me that they got hit by a car about a week after submitting their
391+
thesis, and "[they] would still take the car over the write-up." Always
392+
encouraging to hear ^^;;
393+
394+
The housing situation has simultaneously turned out ever so slightly better and
395+
also not great at all. The University continues to believe that my latest
396+
"authority Top Trumps" -- a signed letter from my GP, a _medical professional_
397+
-- is not good enough to confirm that my mental health would be significantly
398+
better if I didn't have to worry about moving right before the end of my PhD. So
399+
I am now searching for a flat. At least they prolonged it until the end of
400+
August instead of the middle of it, and I should hopefully have written up by
401+
then anyway, so there's that. Regardless of that though, it turns out that
402+
looking for a flat near the end of your PhD is not exactly straightforward
403+
because explaining to people that I am not a student, nor am I technically
404+
employed, but nor am I unemployed, and yes I will be able to make both rent and
405+
my cost of living, but no I can't give an exact figure of how much I make, but
406+
I'm not a "gig worker", is somewhat unique. And nothing scares away letting
407+
agents like a unique situation. Finally managed to get a couple of viewings
408+
though, so that's something. In St Andrews? HA! Forget about that, it is
409+
prohibitively expensive: \>£1200 per month for a one/two bedroom place. And
410+
funnily enough I don't have 40k saved up to put down on a deposit for a mortgage
411+
to buy a small flat either. St Andrews is a great place to live if you happen to
412+
already own Property (TM) or know a current student who can directly pass their
413+
lease on to you. Otherwise it is borderline impossible to find something, and
414+
you'll pay dearly for it.
415+
416+
Oof, that got heavier than I intended, sorry about that. In much, much better
417+
news, my
418+
[TyDe'24 paper](/en/post/tyde-24-paper)
419+
got accepted first try, and with -- and I quote my supervisor -- "unusually
420+
positive reviews"!! : D
421+
On top of giving a bunch of useful advice and feedback -- most of which made it
422+
into the final version of the paper, and the rest will be gold for thesis
423+
sections -- it also means that I get to go present this work at TyDe'24, part of
424+
[ICFP](https://icfp24.sigplan.org/)
425+
in Milan in Italy. And I am lucky enough that the University not only has the
426+
means to pay for the registration fee (which added up to ~€1200 for the student
427+
fee, once workshops were included O.O), but they also pay for travel and
428+
accommodation! I guess that's the flip side of the insanely expensive uni town
429+
where mostly rich undergrads can afford to come. ICFP is 6 days long, from the
430+
2nd to the 7th of September. 6 days in Milan (at a conference, but still) is not
431+
a bad way to end the writing up time if I do say so myself.
432+
433+
"To the LaTeX mines!" -- my supervisor at our last meeting.
434+
He's off on holiday for 3 weeks, so next time I see him I really ought to have
435+
my thesis ready for its first proof-reading. There is light at the end of the
436+
tunnel, and with a bit of luck (and a lot of writing over the next couple of
437+
weeks), the train headlights will switch tracks and reveal the sunlight instead.
438+
The anxiety and stress is _so_ very much still there, but in one way or another,
439+
I will make it out.
440+
441+
See you on the other side. o7 cmdr.
442+

0 commit comments

Comments
 (0)