Structure 1.0.1
- Date
Structure 1.0.1 has been released. This release brings minor changes to best practices for Swift. Specifically:
- Audited closures for use of
@noescape
. - Audited parameter
throws
for use ofrethrows
. - Concurrency testing.
Structure 1.0.1 has been released. This release brings minor changes to best practices for Swift. Specifically:
@noescape
.throws
for use of rethrows
.Before Swift, projects that I worked on used SQLite directly. I could have done the same with Swift, but it felt like I could benefit from writing a wrapper. I used this as a means to teach myself Swift, as well as create something that I could reuse throughout my projects.
Enter Structure! Structure is by no means a complete SQLite wrapper. This framework performs the basic CRUD operations I need, as well as maintain some semblance of thread safety. It also provides simple data access and value transformations.
If you’re curious, check out the GitHub page. There is some simple documentation and lots of tests to get a feel for how the framework works.
Updated 2012-11-06 with an alternative.
Sometimes you have a long running process that is firing off many commands in a row and you don’t get much output from the command. I like to have an idea of what’s happening, so I employ a simple Bash script that I’ve hand typed a million times. It keeps just the data I want on screen and auto-updates ever couple of seconds, so I can keep an eye on it while I’m working.
while true
do
# Some command goes here
sleep 2
clear
done
If you have any modern shell, you can type this in with the line breaks. Now I have a clear console that is showing me just the data I want.
How do I use this? Right now, I have an apt-mirror post mirror script that rsyncs multiple directories. This is an
automated process that runs quietly, so I can use ps -ef | grep rsync
to monitor the process. I’ve also used this to
monitor massive file creation / deletions, so the command could be ls -l | wc -l
to count the files in the director. I
use Hylafax, so I can monitor the modems with faxstat -a
.
After posting this article, it was brought to my attention that I could just use the watch
command. As with a lot of
complex technologies, you tend to learn to do something one way and stay oblivious to other possible ways. watch
is
part of the procps project, so instead of the above loop, you could use:
watch "ps -ef | grep rsync"
This by default runs the given command every 2 seconds. Check out the man page for more options.
Unfortunately, watch
is not part of the default UNIX stack on OS X. It seems to be available in Homebrew, but
since it isn’t already on my system, I’ll probably stick with the bash script. Old habits die hard.
Version 1.0.1 of Stack’s Score Card has been released. This is a maintenance release that does the following:
The initial release of Stack’s Score Card is now available. 1.0 is a core release. Much more will be added in time.
Version 1.0.1 has already been submitted to the App Store to address issues with iOS 6 and iPhone 5.
More info about Stack’s Score Card can be found here