diff options
| author | Paul Buetow <paul@buetow.org> | 2023-03-15 00:59:30 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2023-03-15 00:59:30 +0200 |
| commit | c66d2642b6820ae846fc03c4c9154108e3b80e16 (patch) | |
| tree | 70c7e82dc91553e4473c8947d983ffd52cf08a8f | |
| parent | 6283a72dc705ea6b1715b193d581f393a79d7f82 (diff) | |
Update content for gemtext
| -rw-r--r-- | gemfeed/2023-03-16-the-pragmatic-programmer-book-notes.gmi | 81 | ||||
| -rw-r--r-- | gemfeed/atom.xml.tmp | 6499 | ||||
| -rw-r--r-- | index.gmi | 2 | ||||
| -rw-r--r-- | notes/the-pragmatic-programmer.gmi | 4 | ||||
| -rw-r--r-- | notes/the-pragmatic-programmer.gmi.tpl | 1 | ||||
| -rw-r--r-- | template.gmi | 78 | ||||
| -rw-r--r-- | template.gmi.tpl.sh | 17 |
7 files changed, 6680 insertions, 2 deletions
diff --git a/gemfeed/2023-03-16-the-pragmatic-programmer-book-notes.gmi b/gemfeed/2023-03-16-the-pragmatic-programmer-book-notes.gmi new file mode 100644 index 00000000..6177a96e --- /dev/null +++ b/gemfeed/2023-03-16-the-pragmatic-programmer-book-notes.gmi @@ -0,0 +1,81 @@ +# "The Pragmatic Programmer" book notes + +> Published at 2023-03-15T00:55:20+02:00 + +These are my personal takeaways after reading "The Pragmatic Programmer" by David Thomas and Andrew Hunt. Note that the book contains much more knowledge and pearls of wisdom and that the following notes only contain points I personally found worth writing down. This is mainly for my use, but you might find it helpful too. + +``` + ,.......... .........., + ,..,' '.' ',.., + ,' ,' : ', ', + ,' ,' : ', ', + ,' ,' : ', ', + ,' ,'............., : ,.............', ', +,' '............ '.' ............' ', + '''''''''''''''''';''';'''''''''''''''''' + ''' +``` + +Think about your work while doing it - every day on every project. Have a feeling of continuous improvement. + +* Be a realist. +* Smell challenges. +* Care about your craft. +* Code can always be flawed, but it can meet the requirements. +* You should be proud of your code, though. + +No one writes perfect code, including you. However: + +* Paranoia is good thinking. +* Practice defensive programming and crash early. +* Crashing is often the best thing you can do. +* Changes should be reversible. + +Erlang: Defensive programming is a waste of time. Let it crash. "This can never happen" - don't practise that kind of self-deception when programming. + +Leave assertions in the code, even in production. Only leave out the assertions causing the performance issues. + +Take small steps, always. Get feedback, too, for each of the steps the code does. Avoid fortune telling. If you have to involve in it, then the step is too large. + +Decouple the code (e.g. OOP or functional programming). Prefer interfaces for types and mixins for a class extension over class inheritance. + +* Refactor now and not later. +* Later, it will be even more painful. + +Don't think outside the box. Find the box. The box is more extensive than you think. Think about the hard problem at hand. Do you have to do it a certain way, or do you have to do it at all? + +Do what works and not what's fashionable. E.g. does SCRUM make sense? The goal is to deliver deliverables and not to "become" agile. + +## Continuous learning + +Add new tools to your repertoire every day and keep the momentum up. Learning new things is your most crucial aspect. Invest regularly in your knowledge portfolio. The learning process extends your thinking. It does not matter if you will never use it. + +* Learn a new programming language every year. +* Read a technical book every month. +* Take courses. + +Think critically about everything you learn. Use paper for your notes. There is something special about it. + +## Stay connected + +It's your life, and you own it. Bruce Lee once said: + +> "I am not on the world to life after your expectations, neither are you to life after mine." + +* Go to meet-ups and actively engage. +* Stay current. +* Dealing with computers is hard. Dealing with people is harder. + +It's your life. Share it, celebrate it, be proud and have fun. + +## The story of stone soup + +How to motivate others to contribute something (e.g. ideas to a startup): + +> A kindly, old stranger was walking through the land when he came upon a village. As he entered, the villagers moved towards their homes, locking doors and windows. The stranger smiled and asked, why are you all so frightened. I am a simple traveler, looking for a soft place to stay for the night and a warm place for a meal. "There's not a bite to eat in the whole province," he was told. "We are weak and our children are starving. Better keep moving on." "Oh, I have everything I need," he said. "In fact, I was thinking of making some stone soup to share with all of you." He pulled an iron cauldron from his cloak, filled it with water, and began to build a fire under it. Then, with great ceremony, he drew an ordinary-looking stone from a silken bag and dropped it into the water. By now, hearing the rumor of food, most of the villagers had come out of their homes or watched from their windows. As the stranger sniffed the "broth" and licked his lips in anticipation, hunger began to overcome their fear. "Ahh," the stranger said to himself rather loudly, "I do like a tasty stone soup. Of course, stone soup with cabbage -- that's hard to beat." Soon a villager approached hesitantly, holding a small cabbage he'd retrieved from its hiding place, and added it to the pot. "Wonderful!!" cried the stranger. "You know, I once had stone soup with cabbage and a bit of salt beef as well, and it was fit for a king." The village butcher managed to find some salt beef . . . And so it went, through potatoes, onions, carrots, mushrooms, and so on, until there was indeed a delicious meal for everyone in the village to share. The village elder offered the stranger a great deal of money for the magic stone, but he refused to sell it and traveled on the next day. As he left, the stranger came upon a group of village children standing near the road. He gave the silken bag containing the stone to the youngest child, whispering to a group, "It was not the stone, but the villagers that had performed the magic." + +By working together, everyone contributes what they can, achieving a greater good together. + +E-Mail your comments to hi@paul.cyou :-) + +=> ../ Go back to the main site diff --git a/gemfeed/atom.xml.tmp b/gemfeed/atom.xml.tmp new file mode 100644 index 00000000..cd1145e8 --- /dev/null +++ b/gemfeed/atom.xml.tmp @@ -0,0 +1,6499 @@ +<?xml version="1.0" encoding="utf-8"?> +<feed xmlns="http://www.w3.org/2005/Atom"> + <updated>2023-03-15T00:57:00+02:00</updated> + <title>foo.zone feed</title> + <subtitle>To be in the .zone!</subtitle> + <link href="gemini://foo.zone/gemfeed/atom.xml" rel="self" /> + <link href="gemini://foo.zone/" /> + <id>gemini://foo.zone/</id> + <entry> + <title>'The pragmatic programmer' book notes</title> + <link href="gemini://foo.zone/gemfeed/2023-03-16-the-pragmatic-programmer-book-notes.gmi" /> + <id>gemini://foo.zone/gemfeed/2023-03-16-the-pragmatic-programmer-book-notes.gmi</id> + <updated>2023-03-15T00:55:20+02:00</updated> + <author> + <name>Paul Buetow</name> + <email>hi@paul.cyou</email> + </author> + <summary>These are my personal takeaways after reading 'The Pragmatic Programmer' by David Thomas and Andrew Hunt. Note that the book contains much more knowledge and pearls of wisdom and that the following notes only contain points I personally found worth writing down. This is mainly for my use, but you might find it helpful too.</summary> + <content type="xhtml"> + <div xmlns="http://www.w3.org/1999/xhtml"> + 1c1 +< -rw-r--r--. 1 paul paul 5323 Mar 15 00:55 ../foo.zone-content/gemtext/gemfeed/2023-03-16-the-pragmatic-programmer-book-notes.gmi +--- +> -rw-r--r--. 1 paul paul 5365 Mar 15 00:56 ../foo.zone-content/gemtext/gemfeed/2023-03-16-the-pragmatic-programmer-book-notes.gmi +<h1>"The pragmatic programmer" book notes</h1> +<p class="quote"><i>Published at 2023-03-15T00:55:20+02:00</i></p> +<p>These are my personal takeaways after reading "The Pragmatic Programmer" by David Thomas and Andrew Hunt. Note that the book contains much more knowledge and pearls of wisdom and that the following notes only contain points I personally found worth writing down. This is mainly for my use, but you might find it helpful too.</p> +<pre> + ,.......... .........., + ,..,' '.' ',.., + ,' ,' : ', ', + ,' ,' : ', ', + ,' ,' : ', ', + ,' ,'............., : ,.............', ', +,' '............ '.' ............' ', + '''''''''''''''''';''';'''''''''''''''''' + ''' +</pre><br /> +<p>Think about your work while doing it - every day on every project. Have a feeling of continuous improvement. </p> +<ul> +<li>Be a realist.</li> +<li>Smell challenges.</li> +<li>Care about your craft.</li> +<li>Code can always be flawed, but it can meet the requirements.</li> +<li>You should be proud of your code, though.</li> +</ul> +<p>No one writes perfect code, including you. However:</p> +<ul> +<li>Paranoia is good thinking.</li> +<li>Practice defensive programming and crash early.</li> +<li>Crashing is often the best thing you can do. </li> +<li>Changes should be reversible.</li> +</ul> +<p>Erlang: Defensive programming is a waste of time. Let it crash. "This can never happen" - don't practise that kind of self-deception when programming. </p> +<p>Leave assertions in the code, even in production. Only leave out the assertions causing the performance issues.</p> +<p>Take small steps, always. Get feedback, too, for each of the steps the code does. Avoid fortune telling. If you have to involve in it, then the step is too large.</p> +<p>Decouple the code (e.g. OOP or functional programming). Prefer interfaces for types and mixins for a class extension over class inheritance.</p> +<ul> +<li>Refactor now and not later.</li> +<li>Later, it will be even more painful.</li> +</ul> +<p>Don't think outside the box. Find the box. The box is more extensive than you think. Think about the hard problem at hand. Do you have to do it a certain way, or do you have to do it at all?</p> +<p>Do what works and not what's fashionable. E.g. does SCRUM make sense? The goal is to deliver deliverables and not to "become" agile.</p> +<h2>Continuous learning</h2> +<p>Add new tools to your repertoire every day and keep the momentum up. Learning new things is your most crucial aspect. Invest regularly in your knowledge portfolio. The learning process extends your thinking. It does not matter if you will never use it.</p> +<ul> +<li>Learn a new programming language every year.</li> +<li>Read a technical book every month.</li> +<li>Take courses.</li> +</ul> +<p>Think critically about everything you learn. Use paper for your notes. There is something special about it.</p> +<h2>Stay connected</h2> +<p>It's your life, and you own it. Bruce Lee once said: </p> +<p class="quote"><i>"I am not on the world to life after your expectations, neither are you to life after mine."</i></p> +<ul> +<li>Go to meet-ups and actively engage.</li> +<li>Stay current.</li> +<li>Dealing with computers is hard. Dealing with people is harder. </li> +</ul> +<p>It's your life. Share it, celebrate it, be proud and have fun.</p> +<h2>The story of stone soup</h2> +<p>How to motivate others to contribute something (e.g. ideas to a startup):</p> +<p class="quote"><i>A kindly, old stranger was walking through the land when he came upon a village. As he entered, the villagers moved towards their homes, locking doors and windows. The stranger smiled and asked, why are you all so frightened. I am a simple traveler, looking for a soft place to stay for the night and a warm place for a meal. "There's not a bite to eat in the whole province," he was told. "We are weak and our children are starving. Better keep moving on." "Oh, I have everything I need," he said. "In fact, I was thinking of making some stone soup to share with all of you." He pulled an iron cauldron from his cloak, filled it with water, and began to build a fire under it. Then, with great ceremony, he drew an ordinary-looking stone from a silken bag and dropped it into the water. By now, hearing the rumor of food, most of the villagers had come out of their homes or watched from their windows. As the stranger sniffed the "broth" and licked his lips in anticipation, hunger began to overcome their fear. "Ahh," the stranger said to himself rather loudly, "I do like a tasty stone soup. Of course, stone soup with cabbage -- that's hard to beat." Soon a villager approached hesitantly, holding a small cabbage he'd retrieved from its hiding place, and added it to the pot. "Wonderful!!" cried the stranger. "You know, I once had stone soup with cabbage and a bit of salt beef as well, and it was fit for a king." The village butcher managed to find some salt beef . . . And so it went, through potatoes, onions, carrots, mushrooms, and so on, until there was indeed a delicious meal for everyone in the village to share. The village elder offered the stranger a great deal of money for the magic stone, but he refused to sell it and traveled on the next day. As he left, the stranger came upon a group of village children standing near the road. He gave the silken bag containing the stone to the youngest child, whispering to a group, "It was not the stone, but the villagers that had performed the magic." </i></p> +<p>By working together, everyone contributes what they can, achieving a greater good together.</p> +<p>E-Mail your comments to hi@paul.cyou :-)</p> + </div> + </content> + </entry> + <entry> + <title>How to shut down after work</title> + <link href="gemini://foo.zone/gemfeed/2023-02-26-how-to-shut-down-after-work.gmi" /> + <id>gemini://foo.zone/gemfeed/2023-02-26-how-to-shut-down-after-work.gmi</id> + <updated>2023-02-26T23:48:01+02:00</updated> + <author> + <name>Paul Buetow</name> + <email>hi@paul.cyou</email> + </author> + <summary>Do you need help fully discharging from work in the evenings or for the weekend? Shutting down from work won't just improve your work-life balance; it will also significantly improve the quality of your personal life and work. After a restful weekend, you will be much more energized and productive the next working day. So it should not just be in your own, but also your employers' interest that you fully relax and shut down after work. </summary> + <content type="xhtml"> + <div xmlns="http://www.w3.org/1999/xhtml"> + <h1>How to shut down after work</h1> +<p class="quote"><i>Published at 2023-02-26T23:48:01+02:00</i></p> +<pre> + |\ "Music should be heard not only with the ears, but also the soul." +|---|--\-----------------------|-----------------------------------------| +| | |\ | |@ |\ | +|---|---|--\-------------------|-------------/|----|------|--\----|------| +| @| | |\ |O | 3 / | |@ | | | +|---|--@|---|--\--------|------|---------/----|----|------|-------|------| +| @| @| \ |O | / | | |@ @| @|. | +|-----------|-----|-----|------|-----/---|---@|----|--------------|------| +| @| | |O | | | | @|. | +|-----------|----@|-----|------|----|---@|------------------------|------| + @| | | Larry Komro @|. + -@- [kom...@uwec.edu] +</pre><br /> +<p>Do you need help fully discharging from work in the evenings or for the weekend? Shutting down from work won't just improve your work-life balance; it will also significantly improve the quality of your personal life and work. After a restful weekend, you will be much more energized and productive the next working day. So it should not just be in your own, but also your employers' interest that you fully relax and shut down after work. </p> +<h2>Have a shutdown routine</h2> +<p>Have a routine. Try to finish work around the same time every day. Write any outstanding tasks down for the next day, so you are sure you will remember them. Writing them down brings wonders as you can remove them from your mind for the remainder of the day (or the upcoming weekend) as you know you will surely pick them up the next working day. Tidying up your workplace could also count toward your daily shutdown routine. </p> +<p>A commute home from the office also greatly helps, as it disconnects your work from your personal life. Don't work on your commute home, though! If you don't commute but work from home, then it helps to walk around the block or in a nearby park to disconnect from work. </p> +<h2>Don't work when you officially don't work</h2> +<p>Unless you are self-employed, you have likely signed an N-hour per week contract with your employer, and your regular working times are from X o'clock in the morning to Y o'clock in the evening (with M minutes lunch break in the middle). And there might be some flexibility in your working times, too. But that kind of flexibility (e.g. extending the lunch break so that there is time to pick up a family member from the airport) will be agreed upon, and you will counteract it, for example, by starting working earlier the next day or working late, that one exception. But overall, your weekly working time will stay N hours. </p> +<p>Another exception would be when you are on an on-call schedule and are expected to watch your work notifications out-of-office times. But that is usually only a few days per month and, therefore, not the norm. And it should also be compensated accordingly. </p> +<p>There might be some maintenance work you must carry out, which can only be done over the weekend, but it should be explicitly agreed upon and compensated for. Also, there might be a scenario that a production incident comes up shortly before the end of the work day, requiring you (and your colleagues) to stay a bit longer. But this should be an exceptional case.</p> +<p>Other than that, there is no reason why you should work out-of-office hours. I know many people who suffer "the fear of missing out", so slack messages and E-Mails are checked until late in the evening, during weekends or holidays. I have been improving here personally a lot over the last couple of months, but still, I fall into this trap occasionally. </p> +<p>Also, when you respond to slack messages and E-Mails, your colleagues can think that you have nothing better to do. They also will take it for granted and keep slacking and messaging you out of regular office times. </p> +<p>Checking for your messages constantly outside of regular office times makes it impossible to shut down and relax from work altogether. </p> +<h2>Distract your mind</h2> +<p>Often, your mind goes back to work-related stuff even after work. That's normal as you concentrated highly on your work throughout the day. The brain unconsciously continues to work and will automatically present you with random work-related thoughts. You can counteract this by focusing on non-work stuff, which may include:</p> +<ul> +<li>Exercise. A half an hour workout or yoga session, followed by some stretching, helps to calm your mind after work. </li> +<li>Play (with your family, pets, friends, or video game)</li> +<li>Mindfully listen to music. When have you ever "really" listened to music? I mean, not just as a background stimulation but really paid attention to the melody, rhythm, voice and lyrics? That requires focused attention and distracts you from other thoughts. </li> +<li>Think of or work on that fun passion project. I currently, for example, like to learn and code a bit in Rakulang. </li> +<li>Read. Nothing beats reading a good Science Fiction Novel (or whatever you prefer) before falling asleep.</li> +</ul> +<p>Some of these can be habit-stacked: Exercise could be combined with watching videos about your passion project (e.g. watching lectures about that new programming language you are currently learning for fun). With walking, for example, you could combine listening to an Audiobook or music, or you could also think about your passion project during that walk. </p> +<h2>Get a pet</h2> +<p>Even if you have children, it helps wonders to get a pet. My cat, for example, will remind me a few times daily to take a few minute's breaks to pet, play or give food. So my cat not only helps me after work but throughout the day.</p> +<p>My neighbour also works from home, and he has dogs, which he regularly has to take out to the park.</p> +<h2>Journal your day</h2> +<p>If you are upset about something, making it impossible to shut down from work, write down everything (e.g., with a pen in a paper journal). Writing things down helps you to "get rid" of the negative. Especially after conflicts with colleagues or company decisions, you don't agree on. This kind of self-therapy is excellent. Brainstorm all your emotions and (even if opinionated) opinions so you have everything on paper. Once done, you don't think about it so much anymore, as you know you can access that information if required. But stopping ruminating about it will be much easier now. You will likely never access that information again, though. But at least writing the thoughts down saved your day. </p> +<p>Write down three things which went well for the day. This helps you to appreciate the day. </p> +<h2>Don't stress about what your employer expects from you</h2> +<p>Think about what's fun and motivates you. Maybe the next promotion to Principal or a Manager role isn't for you. Many fall into the trap of stressing themselves out to satisfy the employer so that the next upgrade will happen and think about it constantly, even after work. But it is more important that you enjoy your craftsmanship. Work on what you expect from yourself. Ideally, your goals should be aligned with your employer. I am not saying you should abandon everything what your manager is asking you to do, but it is, after all, your life. And you have to decide where and on what you want to work. But don't sell yourself short. Keep track of your accomplishments.</p> +<h2>Call it a day</h2> +<p>Every day you gave your best was good; the day's outcome doesn't matter. What matters is that you know you gave your best and are closer to your goals than the previous day. This gives you a sense of progress and accomplishment.</p> +<p>There are some days at work you feel drained afterwards and think you didn't progress towards your goals at all. It's more challenging to shut down from work after such a day. A quick hack is to work on a quick win before the end of the day, giving you a sense of accomplishment after all. Another way is to make progress on your fun passion project after work. It must not be work-related, but a sense of accomplishment will still be there.</p> +<p> </p> +<p>E-Mail your comments to hi@paul.cyou :-)</p> + </div> + </content> + </entry> + <entry> + <title>Why GrapheneOS rox</title> + <link href="gemini://foo.zone/gemfeed/2023-01-23-why-grapheneos-rox.gmi" /> + <id>gemini://foo.zone/gemfeed/2023-01-23-why-grapheneos-rox.gmi</id> + <updated>2023-01-23T15:31:52+02:00</updated> + <author> + <name>Paul Buetow</name> + <email>hi@paul.cyou</email> + </author> + <summary>Art by Joan Stark</summary> + <content type="xhtml"> + <div xmlns="http://www.w3.org/1999/xhtml"> + <h1>Why GrapheneOS rox</h1> +<p class="quote"><i>Published at 2023-01-23T15:31:52+02:00</i></p> +<pre> +Art by Joan Stark + _.===========================._ + .'` .- - __- - - -- --__--- -. `'. + __ / ,'` _|--|_________|--|_ `'. \ + /'--| ; _.'\ | ' ' | /'._ ; | + // | |_.-' .-'.' ___ '.'-. '-._| | + (\) \"` _.-` / .-'`_ `'-. \ `-._ `"/ + (\) `-' | .' .-'" "'-. '. | `-` + (\) | / .'(3)(2)(1)'. \ | + (\) | / / (4) .-. \ \ | + (\) | | |(5) ( )'==,J | | + (\) | \ \ (6) '-' (0) / / | + (\) | \ '.(7)(8)(9).' / | + (\) ___| '. '-.._..-' .' | + (\) /.--| '-._____.-' | + (\) (\) |\_ _ __ _ __ __/| + (\) (\) | | +(\)_._._.__(\) | | + (\\\\jgs\\\) '.___________________.' + '-'-'-'--' +</pre><br /> +<p>In 2021 I wrote "On Being Pedantic about Open-Source", and there was a section "What about mobile?" where I expressed the dilemma about the necessity of using proprietary mobile operating systems. With GrapheneOS, I found my perfect solution for personal mobile phone use. </p> +<a class="textlink" href="https://foo.zone/gemfeed/2021-08-01-on-being-pedantic-about-open-source.html">On Being Pedantic about Open-Source</a><br /> +<p>What is GrapheneOS?</p> +<p class="quote"><i>GrapheneOS is a privacy and security-focused mobile OS with Android app compatibility developed as a non-profit open-source project. It's focused on the research and development of privacy and security technologies, including substantial improvements to sandboxing, exploits mitigations and the permission model.</i></p> +<p>GrapheneOS is an independent Android distribution based on the Android Open Source Project (AOSP) but hardened in multiple ways. Other independent Android distributions, like LineageOS, are also based on AOSP, but GrapheneOS takes it further so that it can be my daily driver on my phone.</p> +<a class="textlink" href="https://GrapheneOS.org">https://GrapheneOS.org</a><br /> +<a class="textlink" href="https://LineageOS.org">https://LineageOS.org</a><br /> +<h2>User Profiles</h2> +<p>GrapheneOS allows configuring up to 32 user profiles (including a guest profile) on a single phone. A profile is a completely different environment within the phone, and it is possible to switch between them instantly. Sessions of a profile can continue running in the background or be fully terminated. Each profile can have completely different settings and different applications installed.</p> +<p>I use my default profile with primarily open-source applications installed, which I trust. I use another profile for banking (PayPal, various proprietary bank apps, Amazon store app, etc.) and another profile for various Google services (which I try to avoid, but I have to use once in a while). Furthermore, I have configured a profile for Social Media use (that one isn't in my default profile, as otherwise I am tempted to scroll social media all the time, which I try to avoid and only want to do intentionally when switching to the corresponding profile!).</p> +<p>The neat thing about the profiles is that some can run a sandboxed version of Google Play (see later in this post), while others don't. So some profiles can entirely operate without any Google Play, and only some profiles (to which I rarely switch) have Google Play enabled. </p> +<p>You notice how much longer (multiple days) your phone can be on a single charge when Google Play Services isn't running in the background. This tells a lot about the background activities and indicates that using Google Play shouldn't be the norm.</p> +<h2>Proxying some of the Google offerings </h2> +<p>There's also the case that I am using an app from the Google Play store (as the app isn't available from F-Droid), which doesn't require Google Play Services to run in the background. Here's where I use the Aurora Android store. The Aurora store can be installed through F-Droid. Aurora acts as an anonymous proxy from your phone to the Google Play Store and lets you install apps from there. No Google credentials are required for that!</p> +<a class="textlink" href="https://f-droid.org">https://f-droid.org</a><br /> +<p>There's a similar solution for watching videos on YouTube. You can use the NewPipe app (also from F-Droid), which acts as an anonymous proxy for watching videos from YouTube. So there isn't any need to install the official YouTube app, and there isn't any need to login to your Google account. What's so bad about the official app? You don't know which data it is sending about you to Google, so it is a privacy concern. </p> +<h2>Google Play Sandboxing </h2> +<p>Before switching to GrapheneOS, I had been using LineageOS on one of my phones for a couple of years. Still, I always had to have a secondary personal phone with all of these proprietary apps which (partially) only work with Google Play on the phone (e.g. Banking, Navigation, various travel apps from various Airlines, etc.) somewhere around as I didn't install Google Play on my LineageOS phone due to privacy concerns and only installed apps from the F-Droid store on it. When travelling, I always had to carry around a second phone with Google Play on it, as without it; life would become inconvenient pretty soon. </p> +<p>With GrapheneOS, it is different. Here, I do not just have a separate user profile, "Google", for various Google apps where Google Play runs, but Google Play also runs in a sandbox!!!</p> +<p class="quote"><i>GrapheneOS has a compatibility layer providing the option to install and use the official releases of Google Play in the standard app sandbox. Google Play receives no special access or privileges on GrapheneOS instead of bypassing the app sandbox and receiving a massive amount of highly privileged access. Instead, the compatibility layer teaches it how to work within the full app sandbox. It also isn't used as a backend for the OS services as it would be elsewhere since GrapheneOS doesn't use Google Play even when it's installed.</i></p> +<p>When I need to access Google Play, I can switch to the "Google" profile. Even there, Google is sandboxed to the absolute minimum permissions required to be operational, which gives additional privacy protection.</p> +<p>The sad truth is that Google Maps is still the best navigation app. When driving unknown routes, I can switch to my Google profile to use Google Maps. I don't need to do that when going streets I know about, but it is crucial (for me) to have Google Maps around when driving to a new destination.</p> +<p>Also, Google Translate and Google Lens are still the best translation apps I know. I just recently relocated to another country, where I am still learning the language, so Google Lens has been proven very helpful on various occasions by ad-hoc translating text into English or German for me.</p> +<p>The same applies to banking. Many banking apps require Google Play to be available (It might be even more secure to only use banking apps from the Google Play store due to official support and security updates). I rarely need to access my mobile banking app, but once in a while, I need to. As you have guessed by now, I can switch to my banking profile (with Google Play enabled), do what I need to do, and then terminate the session and go back to my default profile, and then my life can go on :-). </p> +<p>It is great to have the flexibility to use any proprietary Android app when needed. That only applies to around 1% of my phone usage time, but you often don't always know when you need "that one app now". So it's perfect that it's covered with the phone you always have with you. </p> +<h2>The camera and the cloud </h2> +<p>I really want my phone to shoot good looking pictures, so that I can later upload them to the Irregular Ninja:</p> +<a class="textlink" href="https://irregular.ninja">https://irregular.ninja</a><br /> +<p>The stock camera app of the OASP could be better. Photos usually look washed out, and the app lacks features. With GrapheneOS, there are two options:</p> +<ul> +<li>Use the official Google camera app with sandboxed Google Play Services running. You will get the full Google experience here.</li> +<li>Or, just use the default GrapheneOS camera app.</li> +</ul> +<p>The GrapheneOS camera app is much better than the stock OASP camera app. I have been comparing the photo quality of my Pixel phone under LineageOS and GrapheneOS, and the differences are pronounced. I didn't compare the quality with the official Google camera app, but I have seen some comparison videos and the differences seem like they aren't groundbreaking. </p> +<p>For automatic backups of my photos, I am relying on a self-hosted instance of NextCloud (with a client app available via F-Droid). So there isn't any need to rely on any Google apps and services (Google Play Photos or Google Camera app) anymore, and that's great!</p> +<a class="textlink" href="https://nextcloud.com">https://nextcloud.com</a><br /> +<p>I also use NextCloud to synchronize my notes (NextCloud Notes), my RSS news feeds (NextCloud News) and contacts (DAVx5). All apps required are available in the F-Droid store.</p> +<h2>Fine granular permissions</h2> +<p>Another great thing about GrapheneOS is that, besides putting your apps into different profiles, you can also restrict network access and configure storage scopes per app individually.</p> +<p>For example, let's say you are installing that one proprietary app from the Google Play Store through the Aurora store, and then you want to ensure that the app doesn't send data "home" through the internet. Nothing is easier to do than that. Just remove network access permissions from that only app.</p> +<p>The app also wants to store and read some data from your phone (e.g. it could be a proprietary app for enhancing photos, and therefore storage access to a photo folder would be required). In GrapheneOS, you can configure a storage scope for that particular app, e.g. only read and write from one folder but still forbid access to all other folders on your phone.</p> +<h2>Termux</h2> +<p>Termux can be installed on any Android phone through F-Droid, so it doesn't need to be a GrapheneOS phone. But I have to mention Termux here as it significantly adds value to my phone experience. </p> +<p class="quote"><i>Termux is an Android terminal emulator and Linux environment app that works directly with no rooting or setup required. A minimal base system is installed automatically - additional packages are available using the APT package manager.</i></p> +<a class="textlink" href="https://termux.dev">https://termux.dev</a><br /> +<p>In short, Termux is an entire Linux environment running on your Android phone. Just pair your phone with a Bluetooth keyboard, and you will have the whole Linux experience. I am only using terminal Linux applications with Termux, though. What makes it especially great is that I could write on a new blog post (in Neovim through Termux on my phone) or do some coding whilst travelling (e.g. during a flight), or look up my passwords or some other personal documents (through my terminal-based password manager). All changes I commit to Git can be synced to the server with a simple <span class="inlinecode">git push</span> once online (e.g. after the plane landed) again.</p> +<p>There are Pixel phones with a screen size of 6", and that's decent enough for occasional use like that, and everything (the phone, the BT keyboard, maybe an external battery pack) all fit nicely in a small travel pocket.</p> +<h2>So, why not use a pure Linux phone?</h2> +<p>Strictly speaking, an Android phone is a Linux phone, but it's heavily modified and customized. For me, a "pure" Linux phone is a more streamlined Linux kernel running in a distribution like Ubuntu Touch or Mobian. </p> +<p>A pure Linux phone, e.g. with Ubuntu Touch installed, e.g. on a PinePhone, Fairphone, the Librem 5 or the Volla phone, is very appealing to me. And they would also provide an even better Linux experience than Termux does. Some support running LineageOS within an Anbox, enabling you to run various proprietary Android apps occasionally within Linux.</p> +<a class="textlink" href="https://ubuntu-touch.io/">Ubuntu Touch</a><br /> +<a class="textlink" href="https://en.wikipedia.org/wiki/Linux_for_mobile_devices">More Linux distributions for mobile devices </a><br /> +<p>But here, Google Play would not be sandboxed; you could not configure individual network permissions and storage scopes like in GrapheneOS. Pure Linux-compatible phones usually come with a crappy camera, and the battery life is generally pretty bad (only a few hours). Also, no big tech company pushes the development of Linux phones. Everything relies on hobbyists, whereas multiple big tech companies put a lot of effort into the Android project, and a lot of code also goes into the Android Open-Source project. </p> +<p>Currently, pure Linux phones are only a nice toy to tinker with but are still not ready (will they ever?) to be the daily driver. SailfishOS may be an exception; I played around with it in the past. It is pretty usable, but it's not an option for me as it is partial a proprietary operating system.</p> +<a class="textlink" href="https://sailfishos.org">SailfishOS</a><br /> +<h2>Small GrapheneOS downsides </h2> +<p>Sometimes, switching a profile to use a different app is annoying, and you can't copy and paste from the system clipboard from one profile to another. But that's a small price I am willing to pay!</p> +<p>Another thing is that GrapheneOS can only run on Google Pixel phones, whereas LineageOS can be installed on a much larger variety of hardware. But on the other hand, GrapheneOS works very well on Pixel phones. The GrapheneOS team can concentrate their development efforts on a smaller set of hardware which then improves the software's quality (best example: The camera app).</p> +<p>And, of course, GrapheneOS is an open-source project. This is a good thing; however, on the other side, nobody can guarantee that the OS will not break or will not damage your phone. You have to trust the GrapheneOS project and donate to the project so they can keep up with the great work. But I rather trust the GrapheneOS team than big tech. </p> +<p>E-Mail your comments to hi@paul.cyou :-)</p> + </div> + </content> + </entry> + <entry> + <title>Ultra(re)learning Java - My takeaways</title> + <link href="gemini://foo.zone/gemfeed/2022-12-24-ultrarelearning-java-my-takeaways.gmi" /> + <id>gemini://foo.zone/gemfeed/2022-12-24-ultrarelearning-java-my-takeaways.gmi</id> + <updated>2022-12-24T23:18:40+02:00</updated> + <author> + <name>Paul Buetow</name> + <email>hi@paul.cyou</email> + </author> + <summary>As a regular participant in the annual Pet Project competition at work, I always try to find a project where I can learn something new. In this post, I would like to share my takeaways after revisiting Java. You can read about my motivations in my 'Creative universe' post:</summary> + <content type="xhtml"> + <div xmlns="http://www.w3.org/1999/xhtml"> + <h1>Ultra(re)learning Java - My takeaways</h1> +<p class="quote"><i>Published at 2022-12-24T23:18:40+02:00</i></p> +<a href="https://foo.zone/gemfeed/2022-12-24-ultrarelearning-java-my-takeaways/learnjava.jpg"><img src="https://foo.zone/gemfeed/2022-12-24-ultrarelearning-java-my-takeaways/learnjava.jpg" /></a><br /> +<p>As a regular participant in the annual Pet Project competition at work, I always try to find a project where I can learn something new. In this post, I would like to share my takeaways after revisiting Java. You can read about my motivations in my "Creative universe" post:</p> +<a class="textlink" href="https://foo.zone/gemfeed/2022-04-10-creative-universe.html">Creative universe</a><br /> +<p>I have been programming in Java back in the days as a university student, and even my Diploma Thesis I implemented in Java (it would require some overhaul so that it is fully compatible with a recent version of Java, though - It still compiles and runs, but with a lot of warnings, though!):</p> +<a class="textlink" href="https://codeberg.org/snonux/vs-sim">VS-Sim: Distributed systems simulator</a><br /> +<p>However, after that, I became a Linux Sysadmin and mainly continued programming in Perl, Puppet, bash, and a little Python. For personal use, I also programmed a bit in Haskell and C. After my Sysadmin role, I moved to London and became a Site Reliability Engineer (SRE), where I mainly programmed in Ruby, bash, Puppet and Golang and a little bit of C. </p> +<p>At my workplace, as an SRE, I don't do Java a lot. I have been reading Java code to understand the software better so I can apply and suggest workarounds or fixes to existing issues and bugs. However, most of our stack is in Java, and our Software Engineers use Java as their primary programming language.</p> +<h2>Stuck at Java 1.4</h2> +<p>Over time, I had been missing out on many new features that were added to the language since Java 1.4, so I decided to implement my next Pet Project in Java and learn every further aspect of the language as my main goal. Of course, I still liked the idea of winning a Pet Project Prize, but my main objective was to level up my Java skills.</p> +<h2>Ultra(re)lerning & upskilling to Java 18</h2> +<h3>Effective Java</h3> +<p>This book was recommended by my brother and also by at least another colleague at work to be one of the best, if not the best, book about Java programming. I read the whole book from the beginning to the end and immersed myself in it. I fully agree; this is a great book. Every Java developer or Java software engineer should read it!</p> +<a href="https://foo.zone/gemfeed/2022-12-24-ultrarelearning-java-my-takeaways/effective-java.jpg"><img src="https://foo.zone/gemfeed/2022-12-24-ultrarelearning-java-my-takeaways/effective-java.jpg" /></a><br /> +<p>I recommend reading the 90-part effective Java Series on <span class="inlinecode">dev.to</span>. It's a perfect companion to the book as it explains all the chapters again but from a slightly different perspective and helps you to really understand the content.</p> +<a class="textlink" href="https://dev.to/kylec32/series/2292">Kyle Carter's 90-part Effective Java Series </a><br /> +<h3>Java Pub House</h3> +<p>During my lunch breaks, I usually have a walk around the block or in a nearby park. I used that time to listen to the Java Pub House podcast. I listened to *every* episode and learned tons of new stuff. I can highly recommend this podcast. Especially GraalVM, a high-performance JDK distribution written for Java and other JVM languages, captured my attention. GraalVM can compile Java code into native binaries, improving performance and easing the distribution of Java programs. Because of the latter, I should release a VS-Sim GraalVM edition one day through a Linux AppImage ;-).</p> +<a class="textlink" href="https://www.javapubhouse.com">https://www.javapubhouse.com</a><br /> +<a class="textlink" href="https://www.graalvm.org">https://www.graalvm.org</a><br /> +<h3>Java Concurrency course</h3> +<p>I also watched a course on O'Reilly Safari Books online about Java Concurrency. That gave an excellent refresher on how the Java thread pools work and what were the concurrency primitives available in the standard library.</p> +<h3>Read a lot of Java code</h3> +<p>First, the source code is often the best documentation (if programmed nicely), and second, it helps to get the hang of the language and standard practices. I started to read more and more Java code at work. I did that whenever I had to understand how something, in particular, worked (e.g. while troubleshooting and debugging an issue). </p> +<h3>Observed Java code reviews</h3> +<p>Another great way to get the hang of Java again was to sneak into the code reviews of the Software Engineer colleagues. They are the expert on the matter and are a great source to copy knowledge. It's OK to stay passive and only follow the reviews. Sometimes, it's OK to step up and take ownership of the review. The developers will also always be happy to answer any naive questions which come up.</p> +<h3>Took ownership of a roadmap-Java project</h3> +<p>Besides my Pet Project, I also took ownership of a regular roadmap Java project at work, making an internal Java service capable of running in Kubernetes. This was a bunch of minor changes and adding a bunch of classes and unit tests dealing with the statelessness and a persistent job queue in Redis. The job also involved reading and understanding a lot of already existing Java code. It wasn't part of my job description, but it was fun, and I learned a lot. The service runs smoothly in production now. Of course, all of my code got reviewed by my Software Engineering colleagues.</p> +<h2>The good</h2> +<p>From the new language features and syntaxes, there are many personal takeaways, and I can't possibly list them all, but here are some of my personal highlights:</p> +<ul> +<li>Static factory methods and public constructors both have their uses, and it pays to understand their relative merits. Often static factories are preferable (cleaner and easier to read), so avoid the reflex to provide public constructors without first considering static factories.</li> +<li>Java streams were utterly new to me. I love how they can help to produce more compact code. But it's challenging to set the line of when enough is enough. Overusing streams can have the opposite effect: Code becomes more complex and challenging to understand. And it is so easy to parallelize the computation of streams by "just" marking the stream as <span class="i |
