Free Sky: A New Hope
Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method SimilarPosts::execute() should not be called statically in /home/eykd/webapps/net_eykd_newstalk__wp/wp-content/plugins/post-plugin-library/common_functions.php on line 601
Strict Standards: Non-static method SimilarPosts::check_post_plugin_library() should not be called statically in /home/eykd/webapps/net_eykd_newstalk__wp/wp-content/plugins/similar-posts/similar-posts.php on line 57
Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method InSeriesInternal::in_series_linker_content_filter() should not be called statically in /home/eykd/webapps/net_eykd_newstalk__wp/wp-includes/plugin.php on line 163
Strict Standards: Non-static method InSeriesInternal::get_the_ID() should not be called statically in /home/eykd/webapps/net_eykd_newstalk__wp/wp-content/plugins/in-series/in-series-internal.php on line 881
Strict Standards: Non-static method InSeries::adv_PostToSeries() should not be called statically in /home/eykd/webapps/net_eykd_newstalk__wp/wp-content/plugins/in-series/in-series-internal.php on line 881
Strict Standards: Non-static method InSeriesInternal::make_int() should not be called statically in /home/eykd/webapps/net_eykd_newstalk__wp/wp-content/plugins/in-series/in-series.php on line 486
Strict Standards: Non-static method InSeriesInternal::PostToSeries() should not be called statically in /home/eykd/webapps/net_eykd_newstalk__wp/wp-content/plugins/in-series/in-series.php on line 490
Strict Standards: Non-static method InSeriesInternal::GetPostSeriesCachedResults() should not be called statically in /home/eykd/webapps/net_eykd_newstalk__wp/wp-content/plugins/in-series/in-series-internal.php on line 323
Strict Standards: Non-static method InSeriesInternal::make_int() should not be called statically in /home/eykd/webapps/net_eykd_newstalk__wp/wp-content/plugins/in-series/in-series-internal.php on line 325
Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/eykd/webapps/net_eykd_newstalk__wp/wp-content/plugins/wp-slimbox-reloaded/wp-slimbox-reloaded.php on line 84
I’ve been working on a reboot of Free Sky, codenamed “Shiny”, and things are coming along nicely. I’ve learned a lot about program structure in the last two years, and I’m finally beginning to understand the MVC (Model-View-Controller) way of making an app with a graphical interface. A lot of problems that seemed unapproachable two years ago now open themselves to solutions. Instead of writing reams of boilerplate code, my new controllers and views are slim and easy to understand. And I am finally beginning to understand and apply the most important design principle of all: You Ain’t Gonna Need It (a.k.a. YAGNI).
Several frameworks have influenced my new approach: TurboGears finally provided me with an elegant, cleanly encapsulated example of an MVC approach. The Cocos library for Pyglet demonstrated a simple method for managing flow control between screens, with their Director/Scene metaphor. Combining this metaphor with Python’s fairly new Context Manager idiom produces remarkably clean code. This is great, because GUI construction code is almost invariably messy and ugly, so having a clean container for it helps immeasurably.
Regarding YAGNI: I recently re-read The Pragmatic Programmer, and have just started reading Getting Real. I’ve now spent years slogging through reams of complex and buggy code that I once wrote, thinking at the time that “it might come in handy some day”. The principle that “unwritten code is the easiest to debug” now makes sense in a way far beyond head-nodding, “Yeah, that sounds nice, but… wouldn’t be cool if I did this thing, too?”
“Simplify, simplify, simplify!” cried Thoreau, and I’m finally getting around to it. My goal for Shiny in the next couple of months is to have a very small, barely playable game. I’ve been following the Roguelike development world for a little while, I’ve played Dwarf Fortress a few times, and I’ve been inspired to write the first iteration of Shiny in text-only mode, using the excellent python “TUI” library, Urwid. So without further ado, I’m going to go get to work, and leave you with this teaser:
_____ //
// ) ) //
__//__ __ ___ ___ ___ //___
// // ) ) //___) ) //___) ) (( ) ) //\ \ // / /
// // // // \ \ // \ ((___/ /
// // ((____ ((____ //___) ) // \_\ / /
____/_/
You can't take it away from me. Shiny.<p><strong>Possibly related:</strong></p>
- None Found