Chris Padilla/Blog
My passion project! Posts spanning music, art, software, books, and more
You can follow by Newsletter or RSS! (What's RSS?) Full archive here.
- Perfectionism goes out the window quickly when something just needs to get done
- When you can't lean on perfectionism and design, there's only room to follow intuition. A big plus in cultivating that!
- The rhythm helps with any creative process. Routine gets the gears turning for what to make next
- At the start, simply making it to the finish line is it's own reward, regardless of how the music / blog / drawing turned out
Iterators in C#
In JavaScript, there's a bit of magic in arrays and objects. They have methods themselves like myArray.toString()
, and they also have a special way of accessing entries through iterator selectors myArray[2]
.
C# actually exposes this method of class design through iterators!
To get that functionality, we need a method on the class that uses the this keyword:
public string this[string key]
{
get
{
return _dict[key];
}
set
{
_dict[key] = value;
}
}
Above, we'll assume _dict
is of type Dictionary
, a built in Class that functions just like a Python dictionary or JavaScript object.
I've typed the above iterator value with a string, but you could set is as an int and use a List just as well.
Here's what it looks like if we were to reproduce some of the functionality of a JavaScript object:
using System;
using System.Collections.Generic;
namespace HelloWorld7
public class Object
{
private Dictionary<string, string> _dict = new Dictionary<string, string>();
public Dictionary<string, string>.KeyCollection Keys()
{
return _dict.Keys;
}
public string this[string key]
{
get
{
return _dict[key];
}
set
{
_dict[key] = value;
}
}
}
An exception: we can't really expose keys as a static method like we would in JavaScript here. If Keys()
is made static, we would also have to make the internal _dict
public, which defeats the purpose of encapsulating it.
Once that's set, you can create an object instance and return keys like so:
class Program
{
static void Main(string[] args)
{
var myObj = new Object();
myObj["name"] = "Chris";
myObj["city"] = "Dallas";
myObj["pets"] = "Lucy";
Dictionary<string, string>.KeyCollection keyColl = myObj.Keys();
foreach (string key in keyColl)
{
Console.WriteLine(key);
}
// name
// city
// pets
}
}
Rob Ingles Singing Lord of the Rings
I've been listening to Rob Ingles's narration of the Lord of the Rings audiobook. What a treat!
The books are full of songs and rhyme. Ingles actually puts these to his own singing interpretation. A friend told me that Ingles actually got Tolkien's approval for his compositions!
There's such a sense for mood, style, and melody. Really delightful! He really captures the folk feeling to Sam's Rhyme of the Troll:
Tom Bombadil's is probably my favorite. So bouncy, like a woodland Santa Clause. Rob even contrasts the sections with timbre, range, and articulation!! WOW!!
Deadlines as a Creative Tool
A friend of mine was admiring the honesty of a mutual composer friend in saying "I work by deadline. It's the only way I get things done."
After nearly a year of blogging and over a year of putting music out regularly, I tend to agree!
Listening to Intuition
What's worked for me is the regular interval that's expected of anyone putting things out online. Monthly newsletters, weekly podcasts, daily blogs. Except for me, it's been music, words, and art.
Especially in the beginning, arbitrary deadlines are a great way to kickstart a new practice. Some of the benefits:
Building Identity
Regularly sharing online at an interval is also great for identity. James Clear writes nicely on this in Atomic Habits. The gist being that we are what we regularly do. So to be a musician, you have to music regularly.
Doing it in public helps others recognize that as well. I've been so flattered by the folks that have said that they've really enjoyed my writing or that they bopped to an album during work. Cultural validation is part of that identity.
The Balance
There's a spot to find between two points on a spectrum. On one end, there's the rigidity of creating just to reach a finish line at one end. On the other, there's so much play and exploration and purely following whatever idea comes that nothing ever gets finished.
Personally, my challenge at the moment is being on the rigid side! I'm used to life-long commitments here, I played the sax for 20 years. So a new part of the process for me is taking time to reevaluate what intervals are still serving me and which ones need to change.
In other words, keeping quiet deadlines also means knowing when to let some go.
An example for me: In 2022, I wanted to release an album a month. Great fun! Very proud! So far, I've done that for 17 months.
I've kept that going while also picking up other practices, though. And the excitement for learning, say, to draw, has outpaced wanting to put an album out just because I said I would. And, of course, there are only so many hours in the day. So I'm at a spot where that needs negotiating.
No wrong answers, but taking the time to be intentional is what matters.
Like anything else in the actual creative practice — the structure around it requires both the lightness of play and a bit of detail orientation. When enthusiasm and play drives the decision, then the supporting choices can match effortlessly.
Finishing Sketchbook No. 4
The stack is growing!
This one was filled with more studies as part of the Proko courses I'm taking.
Lots of bean studies as part of the figure drawing course:
On to the next one!
Folkin' in G
I already broke a string and learned how to restring this guitar. What an adventure!