Compare commits

...

19 Commits

Author SHA1 Message Date
R Tyler Croy 40fe7400ac tweet 2022-05-10 12:19:57 -07:00
R Tyler Croy b17bc864fb tweet 2022-05-05 15:05:53 -07:00
R Tyler Croy f8b6537921 tweet 2022-05-02 16:42:15 -07:00
R Tyler Croy f0a16908a8 tweet 2022-04-29 16:02:47 -07:00
R Tyler Croy a98ea58151
Token commit to push github pages along 2022-04-29 16:00:27 -07:00
R Tyler Croy a9ae4b1e77
Add a brief blog post about the work that I'm doing with Jupyter locally 2022-04-29 15:52:15 -07:00
R Tyler Croy e41002cf9f
Updated the gems for my newer ruby 2022-04-29 15:06:11 -07:00
R Tyler Croy 05ad989b59 tweet 2022-04-20 09:26:04 -07:00
R Tyler Croy aa579c8c3b
Breaking into engineering
A breaking a blogging dry spell :D I spent so much effort on this email, it'd be
a shame to let this go to waste
2022-04-20 09:18:53 -07:00
R Tyler Croy fdde7ce77d
tweet 2022-01-12 13:42:14 -08:00
R Tyler Croy ef8baff2d8 tweet 2021-12-27 14:33:02 -08:00
R Tyler Croy 47958d4d56 tweet 2021-12-17 13:21:43 -08:00
R Tyler Croy 865eaccea4 tweet 2021-12-16 11:39:20 -08:00
R Tyler Croy bfa6eeb9bd
Add my databricks beacons post 2021-10-22 11:54:14 -07:00
R Tyler Croy 462d491c65 tweet 2021-08-29 10:54:20 -07:00
R Tyler Croy 3643476e10
Add a blog post to cover the last two training rides 2021-08-29 10:52:57 -07:00
R Tyler Croy 707510a030
Tiny updates on the nvim post based on some feedback via twitter 2021-08-26 09:18:58 -07:00
R Tyler Croy 644bcbe3ae
Adding an image for ALC 2021-08-24 10:13:41 -07:00
R Tyler Croy b241f61bf0
Minor copy edits while reviewing this post 2021-08-19 08:26:01 -07:00
34 changed files with 515 additions and 23 deletions

View File

@ -9,3 +9,4 @@ gem "jekyll-include-cache"
gem 'jekyll-paginate'
gem 'jekyll-seo-tag'
gem 'jekyll-watch'
gem 'webrick'

View File

@ -4,17 +4,17 @@ GEM
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
colorator (1.1.0)
concurrent-ruby (1.1.8)
em-websocket (0.5.2)
concurrent-ruby (1.1.10)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
http_parser.rb (~> 0)
eventmachine (1.2.7)
ffi (1.14.2)
ffi (1.15.5)
forwardable-extended (2.6.0)
http_parser.rb (0.6.0)
i18n (1.8.9)
http_parser.rb (0.8.0)
i18n (1.10.0)
concurrent-ruby (~> 1.0)
jekyll (4.2.0)
jekyll (4.2.2)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
@ -32,44 +32,45 @@ GEM
jekyll-include-cache (0.2.1)
jekyll (>= 3.7, < 5.0)
jekyll-paginate (1.1.0)
jekyll-sass-converter (2.1.0)
jekyll-sass-converter (2.2.0)
sassc (> 2.0.1, < 3.0)
jekyll-seo-tag (2.7.1)
jekyll-seo-tag (2.8.0)
jekyll (>= 3.8, < 5.0)
jekyll-tagging (1.1.0)
nuggets
jekyll-watch (2.2.1)
listen (~> 3.0)
kramdown (2.3.1)
kramdown (2.4.0)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.3)
listen (3.4.1)
listen (3.7.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0)
nuggets (1.6.0)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (4.0.6)
pygments.rb (2.1.0)
rake (13.0.3)
rb-fsevent (0.10.4)
public_suffix (4.0.7)
pygments.rb (2.3.0)
rake (13.0.6)
rb-fsevent (0.11.1)
rb-inotify (0.10.1)
ffi (~> 1.0)
rdiscount (2.2.0.2)
rexml (3.2.5)
rouge (3.26.0)
rouge (3.28.0)
safe_yaml (1.0.5)
sassc (2.4.0)
ffi (~> 1.9)
terminal-table (2.0.0)
unicode-display_width (~> 1.1, >= 1.1.1)
unicode-display_width (1.7.0)
unicode-display_width (1.8.0)
webrick (1.7.0)
PLATFORMS
ruby
x86_64-linux
DEPENDENCIES
jekyll
@ -81,6 +82,7 @@ DEPENDENCIES
pygments.rb
rake
rdiscount
webrick
BUNDLED WITH
2.1.4
2.3.8

View File

@ -1,3 +1,3 @@
= brokenco.de
This is my blog
This is my link:https://brokenco.de[blog]

View File

@ -0,0 +1,6 @@
---
layout: microblog
date: 2021-08-29 10:53:13 -0700
title: 718a9252
---
Wrote about my last couple #AIDSLifeCycle training rides, including yesterday's brutal 52 miler https://brokenco.de/2021/08/29/aidslifecycle-2022.html

View File

@ -0,0 +1,8 @@
---
layout: microblog
date: 2021-12-16 11:38:31 -0800
title: 75d294cd
---
The end of the year is a time of simultaneous slowing down and speeding up.
There will be plenty of work to do in January, chill.

View File

@ -0,0 +1,6 @@
---
layout: microblog
date: 2021-12-17 13:20:50 -0800
title: f872080f
---
Every time I read about some musician turning into a bigot as they get older, I remember that everybody in Rage Against the Machine is still awesome.

View File

@ -0,0 +1,8 @@
---
layout: microblog
date: 2021-12-27 14:32:20 -0800
title: de67d516
---
Connected my phone to a wireless network, and then USB tethered it without any effort to my Linux laptop.
2022 might be the year..

View File

@ -0,0 +1,8 @@
---
layout: microblog
date: 2022-01-12 13:41:03 -0800
title: 996a7177
---
I noticed a bike listing from a shop in San Francisco "Perfect for the ALC and other Endurance events", referring to @aidslifecycle.
Pretty cool that ALC is recognized as a driver of bicycles in SF!

View File

@ -0,0 +1,6 @@
---
layout: microblog
date: 2022-04-20 09:25:47 -0700
title: 4b81a4ed
---
I wrote up some tips for breaking into Software Engineering later in your career https://brokenco.de/2022/04/20/breaking-into-engineering.html

View File

@ -0,0 +1,6 @@
---
layout: microblog
date: 2022-04-29 16:01:42 -0700
title: 2c9f6fb7
---
Querying data locally with SQL in Jupyter Notebooks https://brokenco.de/2022/04/29/local-sql-with-jupyter.html

View File

@ -0,0 +1,5 @@
---
layout: microblog
date: 2022-04-29 15:52:44 -0700
title: d73735ad
---

View File

@ -0,0 +1,6 @@
---
layout: microblog
date: 2022-05-02 16:40:22 -0700
title: 28231814
---
My favorite version of success for an open source project I helped create is watching commits being proposed and merged by people who aren't me.

View File

@ -0,0 +1,8 @@
---
layout: microblog
date: 2022-05-05 15:04:18 -0700
title: e7c7ff13
---
Spending a lot of time in management and away from code, I have found myself thinking about how "simple" things used to be.
Software is easy, people are... not.

View File

@ -0,0 +1,10 @@
---
layout: microblog
date: 2022-05-10 12:16:03 -0700
title: cec31666
---
I am constantly flattered by the people who reach out for career advice.
Doesn't matter whether you work for me or not.
If you're in tech and need guidance, I am happy to try to help!

View File

@ -10,7 +10,7 @@ San Francisco, Santa Cruz, King City, Paso Robles, Santa Maria, Lompoc,
Ventura, Los Angeles. For the better part of seven days, I sat on a bicycle
with over 2,200 cyclists and 650 volunteers riding from one part of California
to another to raise money for HIV/AIDS services as part of
[AIDS/LifeCycle](https://www.aidslifecycle.org). In perspective, 545 miles is
[AIDS/LifeCycle](https://www.aidslifecycle.org). For perspective, 545 miles is
further than the distance from Boston to Washington D.C., further than Brussels
to Berlin, further than Tokyo to Hiroshima. It is countless hills, steep
descents, farm fields, supportive on-lookers, packets of chamois butter,
@ -235,7 +235,7 @@ take a look at my aching hindquarters. I knew that they were pressure ulcers, bu
I was hoping for some relief. Nurse Sarah directed me to a tent like those we
slept in, and asked me to bend forward on a chair so she could inspect my bottom.
My feelings of vulnerability were eclipsed by my desire to get fix the problem
My feelings of vulnerability were eclipsed by my desire to fix the problem
so I could finish the ride.
She was concerned that one of the pressure ulcers looked so close to opening this

View File

@ -18,7 +18,7 @@ Only recently as I was preparing a laptop for some Rust hacking did I _finally_
discover what combination of tools was resulting in these annoying inline
warnings.
THe culprit up being
The culprit up being
[LanguageClient-neovim](https://github.com/autozimu/LanguageClient-neovim)
which integrates with the [Rust Language
Server](https://github.com/rust-lang/rls) to provide inline code hinting, error

View File

@ -0,0 +1,169 @@
---
layout: post
title: "Gearing up for AIDS/LifeCycle 2022"
tags:
- cycling
- alc
---
Last time around I didn't train well enough, got sun blisters on my lips, and
broke my bike. This time around I could not be more excited for
[AIDS/LifeCycle](http://www.aidslifecycle.org/) to be back for 2022. The goal
of AIDS/LifeCycle is to raise funds for the San Francisco AIDS Foundation and
Los Angeles LGBT Center, both of which provide numerous critical services to
their respective communities. For my inaugural year in 2019 I was incredibly
fortunate to raise over $6,000 and this year I am shooting for **$10,000**. I
am _also_ training a lot more intelligently this time around, I'm aiming to
have a great time in 2022 and a strong mind and body will be key to that!
**[I'd appreciate your donations by the way](https://actnow.tofighthiv.org/site/TR/Events/AIDSLifeCycleCenter?px=3218607&pg=personal&fr_id=2381).**
I also enjoy writing about my transformative experiences, like that time I [got
my pilot's license](/tag/vfrstudentpilot.html) or my [review of the ALC 2019
ride](/2019/06/23/aids-lifecycle-2019.html). This time will be no different! If
you follow me [on Twitter](https://twitter.com/agentdero) I will be posting
progress under the
[#AIDSLifeCycle](https://twitter.com/search?q=(%23AIDSLifeCycle)%20(from%3Aagentdero)&src=typed_query&f=live)
hashtag. I will also do my best to share training ride recaps on this blog as I
progress along!
<a name="training"></a>
## First Training Ride
The first official ride of my ALC training was a quick 28 mile jaunt from Santa
Rosa to Petaluma and back. I have done this route a number of times but had not
ridden my road bike in over a year! After my bike [broke in ALC
2019](/2019/06/23/aids-lifecycle-2019.html) I was pleasantly surprised that
Bianchi honored the original warranty and I was able to get a good discount on
this wonderful aluminum tube, carbon fork, Impulso All Road 105.
----
Note: I posted [this Twitter thread during the ride with more pictures](https://twitter.com/agentdero/status/1429089290009538564)
----
Setting out on Saturday morning the sky was overcast, the streets damp, and a
mist in the air. It was **perfect**. I glided through Santa Rosa with such
excitement that before I knew it was on the south side of town pushing into the
countryside. Between my excitement and the lightness of the bike, everything
felt _so smooth_.
Riding east of Rohnert Park between Santa Rosa and Petaluma is fairly flat and
most of the roadway has ample shoulders. Too many county residents have a bad
habit of leaving their trashcans in the shoulder which presents a hazard for
passing cyclists like myself. Fortunately however the misty morning seems to
have kept lots of traffic off the road and I could pop out into the lane with
relative impunity.
As I rolled into Petaluma, I genuinely considered straying from my route since
everything thus far had been so _easy_. I had a very hard cut-off time for my
ride which kept me disciplined and on track however. I had only been out about an hour and already made it to Petaluma, much faster than I thought I would be! Turning north back towards
Santa Rosa on Stony Point Rd, where no shoulder exists for about a mile, I
hugged the white line as I progressed towards the Cotati Grade. The long
sloping road is more pronounced for drivers on Highway 101, for cyclists riding
to the west on Stony Point it's less steep but lasts longer.
At the top I paused by the Washoe House for a banana, photo, and some
stretching before continuing back into Santa Rosa.
![First 28 miles of training down](/images/post-images/alc-2022/first-28-miles-down.png)
When I arrived home I was kind of shocked that:
* It had only been a couple hours.
* Despite not having been on a road bike in over a year, my other cross-training kept my fitness level relatively high.
* I was so sweaty, considering how cool their air was.
All said and done, 28 miles is _not that much_ compared to the 545 from San Francisco to Los Angeles, but it's a start!
<a name="valleyford"></a>
## Valley Ford
This weekend I decided I needed to up my mileage and really test myself. This
was a good idea in theory, but there were a number of environmental factors
that really made my trip a bit more than I bargained for. I decided to do the
[Sebastopol / Valley Ford](https://srcc.wildapricot.org/page-2747360) from the
Santa Rosa Cycling Club, which _starts_ in Sebastopol. If you're not sharp on Sonoma county geography, Sebastopol lies a few miles west of Santa Rosa, meaning to _start_ my ride, I would first need to head west.
I did _not_ consider that from my starting point to the route's starting point
was already a **9 mile** trek.
![Getting to the starting line for Valley Ford](/images/post-images/alc-2022/ragle-ranch-start.jpeg)
I stopped at the route's starting point, the Ragle Ranch regional park and had
something to eat and drink. It was later in the morning than I wanted to have
started my ride, and it was already pretty damn hot. I had packed a long-sleeve
shirt and a wind-breaker vest in my backpack and it was already abundantly
clear that neither were going to be necessary.
Fortunately I had the foresight to pack additional sunscreen and *lots* of food.
The first stretch of the route was mostly enjoyable with a pretty sharp climb
from Graton into Occidental, along a road with barely any shoulder and plenty
of turns for cars to take too close. The route [on
Strava](https://www.strava.com/activities/5869035007) listed that climb as a
"Category 4 Climb" which I assume means it's tough, because it was tough.
Persistent cyclists are rewarded on the downside of the slope with a quick descent into Occidental and a break! While in Occidental I'm glad I stopped into a market and purchased both an electrolyte drink and another bottle of water. Topped my bottles off and put the remainder into my backpack. The cyclist club's route explicitly has a *stop* at the Union Hotel in Occidental, but it's only 8 miles into a 38 mile route. That means the hard part of the ride is all at the beginning right?
----
Note: I posted [this Twitter thread](https://twitter.com/agentdero/status/1431649726529560585) with a lot more pictures from the ride.
----
Heading further into west county I was increasingly annoyed that the air was smokey, hot, and the roads less than pleasant. Without a cell phone mount on my bike, I was going off turn by turn directions that I had transcribed on a sheet of notebook paper stuff into my shirt pocket. I had to stop a few times to cross check where I was, one particular hill I started going up was a **15%** grade. I stopped to double-extra check that I was still on the route.
I was. Up and over!
Most of the ride around Valley Ford was desolate. Nothing but a few cows, brown hills, and an increasingly annoyed cyclist on a pretty teal bike.
I stopped on the corner in Bloomfield, around the 30 mile mark and sat down. The heat was oppressive, some of my food had melted in the packaging. My water bottles, one with water the other with electrolytes, were filled with the last of my supplies. I reapplied sunscreen.
This heat.
Climbing out of Bloomfield the road was starting to get a little bit more busy with car traffic and the quality of the asphalt was degrading. My ass hurt. Every one of the hills seemed to be in the most inconvenient spot. Curves with poor visibility, potholed pavement, or zero shoulders.
I was so tired of drinking piping hot water.
As I crawled slowly back into Sebastopol I had to keep reminding myself that my
legs would take me home, I just needed to be mindful of my temperature and
mentality. I thought about my relative in Sebastopol who could give me a ride
home if I needed it. When I finally got back to the head of the Joe Rodota
Trail I stopped for some more to drink and eat, and **sweat**. The air was
dead, it was early afternoon and I still had nine more fucking miles to go.
What I didn't realize on the way into Sebastopol is that there's a gentle
downslope from Santa Rosa, which means there's a gentle _upslope_ back into
Santa Rosa, inconveniently located at the end of my ride.
I stopped at a gas station in Santa Rosa city limits and got another bottle of
water and electrolytes and good grief was I excited to be drinking something
_cool_ for a change. Slogging along I thought "when I get home I should look up
the symptoms of heat exhaustion."
Stepping off the bike at my front gate I was so relieved to finally go inside,
air conditioning! Sitting on my yoga mat and stretching I continued sweating,
my head hurt. I didn't want to overdo liquids so I took a shower, ate some
fruit, and slowly started to feel like a person again.
When I set out that morning I thought I was going to end up riding about 45
miles. Since I miscalculated the distance to Sebastopol and back I ended up
riding about 52 miles.
The first 20 were a breeze, the remaining 32 were very hard earned.
----
There are few places quite like Sonoma county for cyclists. The number of avid
road cyclists or mountain bikers that I know is staggering. Culturally we seem
to do wine, beer, and cycling well in this part of California. I am not just
training for AIDS/LifeCycle but also for me. I enjoy cycling and would love to
get into sufficient shape to take on more tours and races, like the Levi's Gran
Fondo which is hosted in Sonoma county every year (next spring).
Who knows where I'm going next weekend, but I can assure you that I'll be out
there with the rest of the yahoos pedaling around some of our spectacular
country roads, training up for ALC, etc.

View File

@ -0,0 +1,44 @@
---
layout: post
title: I'm a Databricks Beacon
tags:
- scribd
- databricks
---
A bit of belated news but thanks to all the advocacy work we have been doing at
[Scribd](https://tech.scribd.com)_ I am now a [Databricks
Beacon](https://databricks.com/discover/beacons/tyler-croy). The Beacon program is similar
to Docker Captains, Microsoft MVPs, or Java Champions, a group of folks who are
considered both skilled with the technology and in communicating/sharing best
practices, tips, and short-comings with the broader community.
![Beacon profile](/images/post-images/databricks-beacons/header-image.png)
From the [site](https://databricks.com/discover/beacons/) itself:
> The Databricks Beacons program is our way to thank and recognize the community members, data scientists, data engineers, developers and open source enthusiasts who go above and beyond to uplift the data and AI community.
>
> Whether they are speaking at conferences, leading workshops, teaching, mentoring, blogging, writing books, creating tutorials, offering support in forums or organizing meetups, they inspire others and encourage knowledge sharing all while helping to solve tough data problems.
I'm flattered to be included in the inaugural group of Beacons, which include a
number of much more competent data leaders than myself. Most of what I bring to
the table is a *lot* of [Delta Lake](https://delta.io) experience and advocacy.
Delta Lake is the bedrock of Scribd's data platform and I have been investing
heavily in the space with our contribution of the
[delta-rs](https://github.com/delta-io/delta-rs) Rust bindings, upon which
[kafka-delta-ingest](https://www.youtube.com/watch?v=mLmsZ3qYfB0) was built.
[Scribd is a Databricks
customer](https://databricks.com/customers/data-team-effect/scribd), and from
that angle I have been quite impressed with the organization and technologies
they have built. As some folks who have seen [my public talks](https://youtu.be/h5bRBuVmhL4?t=1635) about Databricks,
I also don't hold back in my honest assessment of the platform's strengths and
weaknesses, thus my surprise to be included as a Beacon ;)
I'm looking forward to more events where I am able to share some of the
real-world experiences we're gaining at Scribd in building out massive data
platform systems with Delta Lake and Databricks. And as always, if you want to [help us build out more](https://tech.scribd.com/careers/#open-positions) feel free to email me!

View File

@ -0,0 +1,103 @@
---
layout: post
title: Tips for breaking into Software Engineering
tags:
- opinion
- leadership
- software
- software development
---
I was recently emailed by a new friend asking for some tips on how to break
into software engineering. I *love* emails like this for two reasons: I really
want to help everybody be successful in this industry, and I think we need more
people from "non-traditional" educational backgrounds to enrich the industry.
Since I had some _scarce_ free time, and I ended up writing them a novel of a
reply, I wanted to share my tips with anybody else for whom they might be
useful!
My new friend, let's call them Sarah hasn't been working in the tech industry,
but has lots of experience in managing a business and working directly with
people. They asked (paraphrased):
> I am looking to break into a programming job, I've done lots of Perl and
> Python scripting for automating mundane tasks at work before and in my hobbies.
> There's still a lot I still need to learn, but what suggestions would you have
> to start re-orienting my career?
Below is my advice almost verbatim.
---
My advice would be to look down one of three avenues for breaking into the
software industry given your background and current level of experience:
* QA/Test Automation
* Data Scientist / Analyst
* Infrastructure ("DevOps", which used to have a real meaning)
I have worked with a number of folks that have broken into Engineering by way
of QA from let's call them non-traditional software engineering backgrounds.
The benefit of folks like you is that you have good people skills, high levels
of user empathy, and haven't spent the last decade in the narrow
user-experience silo that most developers have. In many of these positions
people will find themselves writing integration, Selenium, or Appium tests
which are commonly Python, and might match well with some of your existing
experience and desires. I have seen this job position also described as
"Software Development Engineer in Test" (SDET). From the QA organization, it's
easier to train up on an existing code-base, and the motivated individual can
start fixing bugs, rather than just filing them, beginning a transition into a
more traditional Developer role.
Data Scientist / Analyst or even a "Machine Learning Engineer" are all really
people that don't typically have a software engineering background, but are
good at smashing scripts around to get the answers they want from data. Knowing
SQL well enough is usually a pre-requisite, but that's something I am sure is
within your reach. These positions are poorly defined and the interestingness
of each company may vary widely. Sometimes they're in the Engineering org,
sometimes they report under CFO or COO types, so it's kind of a crapshoot if
your ultimate goal is to transition into a classic Developer position. That
ambiguity can also be to your benefit because if the Finance org is
interviewing you, your bar is going to likely be more focused on communication
and people skills rather than raw technical experience. At the end of the day,
it kind of doesn't matter how sharp of a programmer you are long as you are
able to read the tea leaves of data effectively for what the business needs in
these roles.
Infrastructure engineers used to be called sysadmins and were ornery bearded
dudes who wrote Perl, they have all since had to reform and learn how to write
Terraform and work with other systems. The benefit of the infrastructure space
is that it's really a job of gluing things together rather than creating
software from whole cloth. Your existing experience might be the weakest here,
but the scripter background bodes well for jump starting on some of the many
online training resources that are available in the Infrastructure space. I
don't give much credence to certifications, but training up for an AWS
certification would likely give you the fundamentals you would need to get your
foot in the door in many infrastructure organizations.
Lastly, everybody is remote, that is to your advantage and disadvantage. That
means your hiring pool extends far beyond your current location. But that also
means you may be competing with folks who are able to command a lower price
because they live in Nowhere, Indiana.
My career has been defined by startups, and the benefit of many of them is that
their hiring processes aren't rigorous and formulaic like a Google/etc, and
people with gumption can go really far in these types of organizations.
Depending on the direction you want to go, I would also recommend tailoring a
resume to that end rather than submitting your CV. I can help provide some
guidance there.
---
I hope this is helpful to anybody else looking at breaking into the Software
Engineering space with some scripting experience. I'm happy to help review
resumes, give pointers, or in any way my capacity allows, just shoot me an
email!

View File

@ -0,0 +1,73 @@
---
layout: post
title: "Local SQL querying in Jupyter Notebooks"
tags:
- dataeng
- databricks
---
Designing, working with, or thinking about data consumes the vast majority of
my time these days, but almost all of that has been "in the cloud" rather than
locally. I recently watched [this talk about SQLite and
Go](https://www.youtube.com/watch?v=RqubKSF3wig) which served as a good
reminder that I have a pretty powerful computer at my fingertips, and that
perhaps not all my workloads require a big [Spark](https://spark.apache.org)
cluster in the sky. Shortly after watching that video I stumbled into a small
(200k rows) data set which I needed to run some queries against, and my first
attempt at auto-ingesting it into a [Delta table](https://delta.io) in
Databricks failed, so I decided to launch a local [Jupyter
notebook](https://jupyter.org/) and give it a try!
My originating data set was a comma-separated values file (CSV) so my first
intent was to just load it into SQLite using the `.mode csv` command in the
CLI, but I found that to be a bit restrictive. Notebooks have incredible
utility for incrementally working on data. Unfortunately Jupyter doesn't have a
native SQL interface, instead everything has to run through Python. Through my
work with [delta-rs](https://github.com/delta-io/delta-rs) I am somewhat
familar with [Pandas](https://pandas.pydata.org/) for processing data in
Python, so my first attempts where using the Pandas data frame API to munge
through my data.
```python
import pandas
df = pandas.read_csv('data/2021_05-2022_04.csv')
```
I could be dense, but I find SQL to be a pretty understandable tool in
comparison to data frames, so I needed to find some way to get the data into a
SQL interface. The solution that I ended up with was to create an in-memory
SQLite database and use Pandas to query it, which works _okay enough_ to where
I continued working and didn't bother thinking too much about how to optimize
the approach further:
```python
import sqlite3
import pandas
# Loading everything into a SQLite memory database because I hate data frames and SQL is nice
conn = sqlite3.connect(':memory:')
df = pandas.read_csv('data/2021_05-2022_04.csv')
r = df.to_sql('usage', conn, if_exists='replace', index=False)
# useful little helper
sql = lambda x: pandas.read_sql_query(x, conn)
# Show some sample data
sql('SELECT * FROM usage LIMIT 3')
```
The benefit of this approach is that I can create additional tables in the
SQLite database with static data sets, or other CSVs. Since I'm also just doing
some simple ad-hoc analysis, I can skip writing anything to disk and keep
things snappy in memory.
I created the little `sql` lambda to make the notebook a bit more
understandable, and to get out of exposing the cursor or database connection to
every single cell, meaning that most of my cells in the notebook are simply
just `sql('SELECT * FROM foo')` statments with some documentation surrounding
them.
Fairly simple, easy enough to play with data quickly on my local machine
without invoking all the infinite cosmic powers the cloud provides!

View File

@ -32,4 +32,5 @@ body {
img {
vertical-align: middle;
max-width: 100%;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

View File

@ -0,0 +1 @@
Wrote about my last couple #AIDSLifeCycle training rides, including yesterday's brutal 52 miler https://brokenco.de/2021/08/29/aidslifecycle-2022.html

View File

@ -0,0 +1,3 @@
The end of the year is a time of simultaneous slowing down and speeding up.
There will be plenty of work to do in January, chill.

View File

@ -0,0 +1 @@
Every time I read about some musician turning into a bigot as they get older, I remember that everybody in Rage Against the Machine is still awesome.

View File

@ -0,0 +1,3 @@
Connected my phone to a wireless network, and then USB tethered it without any effort to my Linux laptop.
2022 might be the year..

View File

@ -0,0 +1,3 @@
I noticed a bike listing from a shop in San Francisco "Perfect for the ALC and other Endurance events", referring to @aidslifecycle.
Pretty cool that ALC is recognized as a driver of bicycles in SF!

View File

@ -0,0 +1 @@
I wrote up some tips for breaking into Software Engineering later in your career https://brokenco.de/2022/04/20/breaking-into-engineering.html

View File

@ -0,0 +1 @@
Querying data locally with SQL in Jupyter Notebooks https://brokenco.de/2022/04/29/local-sql-with-jupyter.html

View File

@ -0,0 +1 @@
My favorite version of success for an open source project I helped create is watching commits being proposed and merged by people who aren't me.

View File

@ -0,0 +1,3 @@
Spending a lot of time in management and away from code, I have found myself thinking about how "simple" things used to be.
Software is easy, people are... not.

View File

@ -0,0 +1,5 @@
I am constantly flattered by the people who reach out for career advice.
Doesn't matter whether you work for me or not.
If you're in tech and need guidance, I am happy to try to help!