Uri.ToString Must Die
20 Aug
If your code uses Uri.ToString, it’s probably a bug.
The Uri.ToString method is documented as returning the “unescaped canonical representation” of the URI. Put simply, this means it’s corrupted. Characters like + and & will become unescaped, which completely changes the meaning of the URI.
Say you want to use WolframAlpha to do some maths:
Exceptions thrown by BitmapImage and BitmapFrame
1 Aug
Scott Hanselman blogged about an ArgumentException that can be thrown when loading an image with a corrupted color profile. Coincidentally, we had been unifying the exception handling for BitmapImage in the Logos 4 code that same day. These are all the exceptions we have found WPF (or WIC) to throw when loading a BitmapImage (by setting its StreamSource or UriSource property) or BitmapFrame (by calling BitmapFrame.Create).
ArgumentException
Sample Call Stack
System.ArgumentException: The image has corrupted metadata header.
---> System.Runtime.InteropServices.COMException (0x88982F63): Exception from HRESULT: 0x88982F63
--- End of inner exception stack trace ---
at System.Windows.Media.Imaging.BitmapDecoder.SetupDecoderFromUriOrStream(Uri uri,
Stream stream, BitmapCacheOption cacheOption, Guid& clsId, Boolean&
isOriginalWritable, Stream& uriStream, UnmanagedMemoryStream&
unmanagedMemoryStream, SafeFileHandle& safeFilehandle)
at System.Windows.Media.Imaging.BitmapDecoder.CreateFromUriOrStream(Uri baseUri, Uri uri,
Stream stream, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption,
RequestCachePolicy uriCachePolicy, Boolean insertInDecoderCache)
at System.Windows.Media.Imaging.BitmapDecoder.Create(Stream bitmapStream,
BitmapCreateOptions createOptions, BitmapCacheOption cacheOption)
at System.Windows.Media.Imaging.BitmapFrame.CreateFromUriOrStream(Uri baseUri, Uri uri,
Stream stream, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption,
RequestCachePolicy uriCachePolicy)
at System.Windows.Media.Imaging.BitmapFrame.Create(Stream bitmapStream,
BitmapCreateOptions createOptions, BitmapCacheOption cacheOption)
Cause and Workaround
An ArgumentException generally seems to be caused by a corrupted image metadata or header. Scott Hanselman suggests using BitmapCreateOptions.IgnoreColorProfile to ignore potentially corrupt color profile information; we don’t know of any workarounds for other types of corruption.
COMException
Sample Call Stack
System.Runtime.InteropServices.COMException (0x80070000): An invalid character was found in text content.
at System.Windows.Media.ColorContextHelper.OpenColorProfile(IntPtr pProfile)
at System.Windows.Media.ColorContext.FromRawBytes(Byte[] data, Int32 dataLength)
at System.Windows.Media.ColorContext.FromStream(Stream stm, String filename)
at System.Windows.Media.ColorContext.Initialize(Uri profileUri, Boolean isStandardProfileUriNotFromUser)
at System.Windows.Media.ColorContext..ctor(PixelFormat pixelFormat)
at System.Windows.Media.Imaging.BitmapSource.CreateCachedBitmap(BitmapFrame frame,
BitmapSourceSafeMILHandle wicSource, BitmapCreateOptions createOptions, BitmapCacheOption
cacheOption, BitmapPalette palette)
at System.Windows.Media.Imaging.BitmapFrameDecode.FinalizeCreation()
at System.Windows.Media.Imaging.BitmapFrameDecode..ctor(Int32 frameNumber,
BitmapSourceSafeMILHandle sourceHandle, BitmapCreateOptions createOptions,
BitmapCacheOption cacheOption, BitmapDecoder decoder)
at System.Windows.Media.Imaging.BitmapDecoder.SetupFrames(BitmapDecoder decoder,
ReadOnlyCollection`1 frames)
at System.Windows.Media.Imaging.BitmapDecoder.get_Frames()
at System.Windows.Media.Imaging.BitmapFrame.CreateFromUriOrStream(Uri baseUri, Uri uri,
Stream stream, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption,
RequestCachePolicy uriCachePolicy)
at System.Windows.Media.Imaging.BitmapFrame.Create(Uri bitmapUri, RequestCachePolicy uriCachePolicy)
at System.Windows.Media.Imaging.BitmapFrame.Create(Uri bitmapUri)
Cause and Workaround
This particular exception was caused by an invalid system color profile (set in the Advanced tab in Color Management in Control Panel). The user with this problem got an error message when he opened that dialog, but once he reset the device profile to the system default, this COMException stopped being thrown.
Note that the exception message (“An invalid character was found”) is completely unrelated to the actual problem; the error handling logic in ColorContextHelper has a bug.
FileFormatException
Sample Call Stack
System.IO.FileFormatException: The image format is unrecognized.
---> System.Runtime.InteropServices.COMException (0x88982F07): Exception from HRESULT: 0x88982F07
--- End of inner exception stack trace ---
at System.Windows.Media.Imaging.BitmapDecoder.SetupDecoderFromUriOrStream(Uri uri,
Stream stream, BitmapCacheOption cacheOption, Guid& clsId, Boolean& isOriginalWritable,
Stream& uriStream, UnmanagedMemoryStream& unmanagedMemoryStream,
SafeFileHandle& safeFilehandle)
at System.Windows.Media.Imaging.BitmapDecoder.CreateFromUriOrStream(Uri baseUri, Uri uri,
Stream stream, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption,
RequestCachePolicy uriCachePolicy, Boolean insertInDecoderCache)
at System.Windows.Media.Imaging.BitmapImage.FinalizeCreation()
at System.Windows.Media.Imaging.BitmapImage.EndInit()
Cause and Workaround
This can be caused by trying to load a file that isn’t an image. It can also be caused by loading an image from a Stream that is not at the origin. To work around this bug, see my previous blog post and the sample RebasedStream source code.
NotSupportedException
Sample Call Stack
System.NotSupportedException: No imaging component suitable to complete this operation was found.
---> System.Runtime.InteropServices.COMException (0x88982F50): Exception from HRESULT: 0x88982F50
--- End of inner exception stack trace ---
at System.Windows.Media.Imaging.BitmapDecoder.SetupDecoderFromUriOrStream(Uri uri,
Stream stream, BitmapCacheOption cacheOption, Guid& clsId, Boolean& isOriginalWritable,
Stream& uriStream, UnmanagedMemoryStream& unmanagedMemoryStream,
SafeFileHandle& safeFilehandle)
at System.Windows.Media.Imaging.BitmapDecoder.CreateFromUriOrStream(Uri baseUri, Uri uri,
Stream stream, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption,
RequestCachePolicy uriCachePolicy, Boolean insertInDecoderCache)
at System.Windows.Media.Imaging.BitmapFrame.CreateFromUriOrStream(Uri baseUri, Uri uri,
Stream stream, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption,
RequestCachePolicy uriCachePolicy)
at System.Windows.Media.Imaging.BitmapFrame.Create(Uri bitmapUri, RequestCachePolicy uriCachePolicy)
at System.Windows.Media.Imaging.BitmapFrame.Create(Uri bitmapUri)
Cause and Workaround
This error is typically due to bad metadata in the image. Curiously, we see this error the most often on Windows 7 (and a Vista system may load the same image just fine!); maybe this is due to WIC changes in Windows 7. For images we control, opening and saving them again in Paint.NET (or some other image editing program) overwrites the bad metadata and allows WPF/WIC to load the image.
OutOfMemoryException
Cause and Workaround
If there is already memory pressure on the system (e.g., from other components in your application), and the image being loaded is very large, there may not be enough virtual address space for WIC/WPF to allocate the storage it needs to decode the bitmap. (And, sometimes, both native and managed buffers are required, which doubles memory usage!)
Setting BitmapImage.DecodePixelWidth or BitmapImage.DecodePixelHeight (to something smaller than the actual size) can dramatically reduce memory usage and allow the image to be loaded. This is especially useful if your application only needs to show a thumbnail in the UI; it’s also much more efficient than loading the original image and scaling it in XAML.
IOException / UnauthorizedAccessException
Sample Call Stack
System.IO.IOException: Cannot locate resource 'images/icon.png'.
at MS.Internal.AppModel.ResourcePart.GetStreamCore(FileMode mode, FileAccess access)
at System.IO.Packaging.PackagePart.GetStream(FileMode mode, FileAccess access)
at System.IO.Packaging.PackWebResponse.CachedResponse.GetResponseStream()
at System.IO.Packaging.PackWebResponse.GetResponseStream()
at System.IO.Packaging.PackWebResponse.get_ContentType()
at System.Windows.Media.Imaging.BitmapDecoder.SetupDecoderFromUriOrStream(Uri uri,
Stream stream, BitmapCacheOption cacheOption, Guid& clsId, Boolean& isOriginalWritable,
Stream& uriStream, UnmanagedMemoryStream& unmanagedMemoryStream,
SafeFileHandle& safeFilehandle)
at System.Windows.Media.Imaging.BitmapDecoder.CreateFromUriOrStream(Uri baseUri, Uri uri,
Stream stream, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption,
RequestCachePolicy uriCachePolicy, Boolean insertInDecoderCache)
at System.Windows.Media.Imaging.BitmapImage.FinalizeCreation()
at System.Windows.Media.Imaging.BitmapImage.EndInit()
at System.Windows.Media.Imaging.BitmapImage..ctor(Uri uriSource, RequestCachePolicy uriCachePolicy)
at System.Windows.Media.Imaging.BitmapImage..ctor(Uri uriSource)
Cause and Workaround
If you’re loading an image from a file: URI, any normal filesystem-related exceptions that come from opening local files could be thrown. Or, if you’re using pack: URIs, an exception will be thrown if there’s a typo in the URI or the named resource is missing.
Summary
The BitmapImage and BitmapFrame creation functions can throw a wide variety of exception types–the list above may very well not be exhaustive (and the documentation provides no information on what else may be thrown). Since these exceptions can depend on many environmental factors (client OS, file permissions, memory pressure, etc.), code that loads bitmaps needs to anticipate failure when loading any image and gracefully handle this situation.
This post originally appeared on code.logos.com
Two patches for System.Data.SQLite
30 Jul
System.Data.SQLite is a great ADO.NET wrapper around the free SQLite embedded database library. Today we contributed two simple patches to the project.
The first patch adds support to SQLiteJournalModeEnum for the “truncate” journal mode (added in v3.6.4 of SQLite).
The second patch adds support to SQLiteException for logging the extended error information (for SQLITE_IOERR).
This post originally appeared on code.logos.com
iPad
30 Jun
Written by: Wes Allen
My son has Ocular Albinism. It doesn’t slow him down much, but it does make reading a frustrating experience for him. I’ve found his frustration disheartening because my son is a very good reader. He has the ability to give characters voices and can work unfamiliar words out pretty well.
At our church children are given a Bible at a certain age, and our son is receiving his this year. We assumed that we could get a large print Bible that would work for him, but on Monday we checked out the large print Bibles and found that there we wholly unsuitable for someone with my son’s sight issues. The font was still far too small for him to read without a magnifier of some kind, and even then the paper was so thin the text on the opposite side could easily be seen – for someone who needs strong contrast, it would have made it impossible for him to read.
Three years ago he would have been out of luck, but the advent of digital readers offers my son a chance to learn to enjoy reading like everyone else in the family (which he desperately wants to do). So my wife and I resolved that we would look for grants to help acquire an iPad for his use in school, home, and church. Really, that wouldn’t have been a difficult task.
You may be asking, “Why an iPad?” For a few reasons:
- It’s backlit. The e-ink displays are nice, but they are terrible in low light and so the lit screen is a must for someone who has vision issues like my son.
- It’s out. I would have loved to see what Android and WebOS tablets will come out – but they aren’t here yet and we have a small window to get our son reading for enjoyment. We also will need it for school come September.
- It’s simple, he took to it immediately.
- It’s got multiple book stores. iBooks is nice, but the book selection is terrible. Kindle has a nice book selection but for some dumb reason they limit how big you can make the font. Kobo isn’t a great experience, but has good font sizes and a good number of books. B&N doesn’t have their iPad reader out yet, I expect it to be well-designed.
- Even though it’s simple, it’s multi-function. I can set up a drop-box between him and his teachers and he can have access to lesson notes, reducing the strain looking at the board puts on his eyes.
So, those are some of the reasons. Like I said we had committed to writing grants to acquire the device, but we didn’t have to wait that long. In a rare AT&T late voicemail delivery #win, my mother called up shortly after we left the Christian book store and went on to other errands. She works at a local university so I said, “Hey, while you’re on the line, do you think you could give me some leads on where to apply for educational grants?” When my mother asked why I was looking I told her about what we wanted to do for our son and why we thought the iPad would work well for him. She said, “You have a grant.” I said something like, “Whubhuh?” To with my mother replied, “It’s called ‘Aunt Ann’s estate.’”
My great aunt, the last matriarch of the depression generation for our extended family passed away last year, she apparently left money to her nieces and nephews and my mom was looking for a good way to spend it. She said, “This is what I want to do with it, go get him one.”
Now, my folks are not wealthy. It also wouldn’t have been difficult to write a grant for the device, so I tried to balk at my mom’s generosity by nervously chuckling. She got a bit miffed with me when I did that. Mom’s can do that. Her offer also wasn’t some sort of impulse purchase (that’s my job). My Aunt Ann spent her entire life in the service of others, particularly in seeing the elderly empowered rather than set aside in their later years. She even was invited to a White House dinner once because of her work (I remember readin the invitation). My mom wanted to do something with the money that would be in line with her aunt had lived – she insisted this was it.
One of the things I will always be thankful for in my family, both nuclear and extended, is the value of education. My mom saw a way to see that her grandson could strive forward, and she jumped on it. I’m very thankful.
Below is a video of our son seeing the iPad for the first time on Monday. Before you watch it let me stress a couple of things:
- This is his iPad. Yes, I’m a geek and it it tempting to take this with me wherever I go and play with it. That would be a terrible thing to do with my mother’s generosity. Yet, it’s tempting – but it’s not mine. I’ll have to save up money for that.
- While he says, “It has my games” in the video – I have very few games on this (and some are for my wife to play after our son crashes for the night). He likes “little metal ball” – and it’s good practice for his eye-hand coordination. This is for reading, and if he takes it into his room at night that’s all he will be allowed to do with it. He has a DsiXL for games, it was his birthday present.
So, yes, I will do some reviews on my thoughts on the iPad and it’s uses, but I’m more interested in tracking how my son uses it. He’s very into the Winny The Pooh that comes with iBooks. Now if iBooks would only get the Narnia books. I got him a sample chapter of Eregon, but he said, “No, this is a book where people die – I don’t like those.”
Detecting the Character Encoding of a File
13 May
There are several occasions when it’s necessary to automatically detect the encoding that’s used by a file: perhaps your program has an “Import” feature that allows the user to open an arbitrary text file, or perhaps you need to read a HTML file and don’t have access to (or can’t trust) the Content-Type HTTP header. (For an introduction to encodings, see The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!) by Joel Spolsky.)
On U.S. English Windows, you can usually assume that the file might be encoded with UTF-8 or Windows-1252, but if you guess wrong, you might get text that looks like this:
�It�s mine,� he said.
or this:
“It’s mine,†he said.
or worst yet, this:
Unhandled System.Text.DecoderFallbackException
While it’s obviously best to know the encoding that’s used by the input you’re processing, sometimes there’s no way to know it ahead of time. In that case, there are libraries that can guess the encoding, usually based on statistical analysis of the bytes or detection of invalid byte sequences. The Mozilla project has a universal charset detector, and Microsoft has been shipping MLang, a COM component that provides code page detection through the IMultiLanguage2.DetectCodepageInIStream method since IE5.
The COM interfaces and structures we need are declared as follows (definitions taken from MLang.h in the Windows SDK):
Pinned GCHandle Wrapper
13 May
The GCHandle type is useful when passing a memory address to an unmanaged function (without using unsafe code). In most cases, you will want to allocate it as GCHandleType.Pinned so that the garbage collector doesn’t move the data in memory while native code is using it. As per the documentation, “This prevents the garbage collector from moving the object and hence undermines the efficiency of the garbage collector. Use the Free method to free the allocated handle as soon as possible.”
It would be nice to use the ‘using’ statement with GCHandle to (a) ensure that Free is always called, and (b) clearly mark the scope of the GCHandle and limit its lifetime. Unfortunately, GCHandle does not implement IDisposable, but it’s straightforward to write a wrapper struct that does:
5 Years, Just Wow
7 May
Written by: Mobile Ministry Magazine
I’ve been sitting on the idea of this post for sometime. To be honest, I’ve really had many times during the past five years where I felt that MMM ended to be let go.
Then tonight, I was visiting with some friends, and it hit me just how important it has been for MMM to be here for the past 5 years. Yes, I can make the suggestion that it was needed for all of you who have come here over the years and gained insight towards life at teh intersection of mobile and faith. But really, it was for me to see just how much God values the gifts that we have, and how those gifts are to be used in the Body.
In the course of 5 years, there has been a number of PDAs, smartphones, laptops, and a few tablets that have passed through here. This site has gone through 5 major redesigns, and countless tweaks. Its been on Blogger the entire time, but took nearly 8 months or so for it to find a stable server to call home.
There have been guest posts by journalists, students, pastors, and evangelists. MMM has been noted at teh BBC and ABC. Its seen life on Jaiku, Twitter, Mippin, and Mobify.Me.
There has been reviews of devices, devotions, themed series, and the content that started it all – the issues.
This has been one heck of a ride. And I know that there are not many websites out there which can say that they have gone for 5 years on no budget. But man, God has shown me and Mobile Ministry Magazine a whole lot of favor.
I owe Sammy at Palm Addict a big thanks for his encouragement to just start this online, and his countless posts letting people know of MMM. Thanks to the host of folks who are represented in the links section – its amazing what your encouragement has meant over the years. And a huge thanks to LJ over at Trailblazin Ministries – dude, I love you in Christ and because of CHrist. THank you immensly for your words of wisdom, encouragement, and straightening up.
Now, there a some people who would say that they saw MMM going this far. There are some who are wondering still how we made it this far. I have no idea except to say that it has been God’s grace. A whole lot of grace.
Lord willing, before Blogger’s FTP service gets shut down, we’ll get another redesign up and then some stuttering of things as the move to another blogging system has been a lot slower than hpoed for. God, I really wish that I could have done a lot of things faster, better, with more clarity of the impacts etc. This site has been one heck of a learning experience, and I hope that for you visiting, reading, or just checking to see if MMM has finally found an editor, that you can understand that we are only moving forward because of the grace afforded to us.
Its been 5 years. And there are over 1700 posts here of stories which talk about life at teh intersection of faith and mobile tech. Wow. Just wow. If God gives this site another decade under my watch, I wonder what the imppacts and stories will look like then.
A new mission statement therefore for MMM: Enabling the story and His-story of the Christian faith through a mobile lens. How this is done has been stated for 5 years, but in this next stage of life for me and this site, we dig into this further. Hope you will come and share your story with us.
This post originally appeared on Mobile Ministry Magazine
It’s “Magic”
7 May
Written by: Wes Allen
This week I got to play with an iPad for the first time – let me tell you, it’s a pretty impressive product. I really does look like a big iTouch, but the experience of using it is completely different. In fact, it’s all the computer my wife needs, and I have great hopes for tablets like the iPad to assist those who, while not blind, are severely visually impaired (like my son). Heck, I’d like to have one to use around the house.
There’s something about the iPad’s marketing tactics, however, that’s been nagging at my mind since it was first announced. Yes, the name is…. unfortunate (it might be the rare instance in history where a focus group actually would have improved a product), but I’ve gotten used to the name. What’s been nagging at me about the iPad’s marketing is the proud proclamation that the iPad is “magic.” Geeks like me have jumped all over that word, it seems to be the united opinion that hearing “it’s magic” about the iPad is akin to having someone run their fingers down a chalkboard. I share the sentiment, but because of who I am I started to think, “Why are we reacting to this word so strongly?” I’ve come to the conclusion that we geeks react so strongly to this word because we instinctively understand what this means.
“Magic,” in the Western Context, has come to encapsulate any kind of secret knowledge that’s kept from the uninitiated by a guild or secret society. Those who are not initiated into the guild need this protection because if they used it they’d only end up harming themselves and others. A great example of this view of magic can be found in the Harry Potter series (the ban on under-age wizards) and also in Terry Pratchett’s Discworld novels (Unseen university exists to keep people from using magic, which can accidentally destroy the world on a routine basis). Geeks understand this, when we drop to the command line and people’s eyes glaze over we get a glimpse of how the uninitiated see our world – “ls -l” might as well be an incantation to a non-geek. We like the fact that we stand between the user and their self-destruction – and it’s one of the reasons why we get so upset when users decide to use the magic, bypass our safe-guards, and then cry out for help when the digital demons come to ruin their day. We refer to this problem PEBKAC. If you don’t know what that means, chances are you’ve been a PEBKAC at some point in your life, you’re not in the guild.
Now, as I said, we’re quite happy being the digital wizards (or, if you want to go religious, “priests”). We stand between the users and chaos and we take pride in that. This is why we hate it when the iPad is referred to as “magic.” First, it offends our sensibilities that the uninitiated would be given the power of our digital realm without having to be taught how to think. All someone who uses an iPad has to know is where to touch and how to type in their password to buy an app – yet, they’ll still get to dance around the tablet like they know what they’re doing. Second, we geeks bristle at the fact that we, who know how to think are are initiated into the grand guild of geeks, are only allowed to use the same limited magic on the iPad that people who are normally PEBKAC get to use. It’s like Apple is saying that there’s another guild that only exists at 1 Infinite Loop, and we aren’t allowed to even consider joining it. So, we get peeved and think, “Who does Steve Jobs think he is, anyway?” What really hacks us off though, is that Steve Jobs isn’t really even considered a geek by the initiated, he’s an artist who employs geeks to merge the worlds of art and digital magic for the PEBKAC peoples of the world. In Steve Job’s world, it’s like we’re unnecessary, his special guild is all the world needs to be protected from digital chaos – and so we get miffed.
The thing is, we know that Steve Jobs still needs us, and he knows it as well. After all, without us where would he get the geeks to create the alloy of his art and our digital magic? So what do we do? We take our guild underground, we “jailbreak” our phones and tablets, and teach others the secrets that are happening under the screen of limited (yet pretty) magic that Steve’s guild offers to the PEBKAC masses. Yes, we know that there are other platforms out there that we don’t need to break into, but the pride of geeks is huge, and so we break into the walls of the iCastle in an act of rebellion. Yet, I think the best of us will eventually find the Artist waiting for us in some hallway of the iCastle with a smile on his face – and before we can attack he’ll say, “Oh good, I’ve been waiting for you. You see, I have this idea….”
It’s like…. magic.
My Django Talk at LinuxFest
7 May
Written by: Sean Boisen
Apparently i neglected to let Blogos readers know that i was speaking at LinuxFest Northwest this past weekend: my bad! My talk was a basic practical intro to Django, the Python-based web application framework, entitled “From 0 to Website in 60 Minutes – with Django“. Since Django is touted (rightly in my view) as a highly-productive way to do web development, what better way to demonstrate that than to actually build a functioning database-backed website in the course of the talk?
It was a pretty ambitious goal, and i had to take a few shortcuts to pull it off (like starting past the boring stuff, with Python/Django/MySQL already installed, and data ready to go). But i think i can fairly claim to have delivered what i promised. We walked through an application that’s been a side-project for the Whatcom Python Users Group, a web version of Sustainable Connection’s Food and Farm Finder brochure. It’s a nice simple learning example, well-suited to tutorial purposes. I’d say there were at least 40 or so in attendance, many the kind of beginners i was trying to focus on. And even though the time slot turned out to only be 45 minutes, I finished with several minutes to spare (in retrospect, i could have gone a little slower).
Slides are here, along with the data you need to follow them on the main page for the talk. I have audio of the talk that i’ll post in the next day or two once i’ve cleaned it up a bit: then it will be almost like being there (though without the ability to make sense of the “skeleton” joke). I was glad to have the opportunity to shine a little light on Django and repay a tiny portion of the debt of gratitude i owe its creators, since it’s been a major productivity boost in my work at Logos.
Here’s another reason why i give talks whenever i get the chance: you always learn more when you teach others. As a concrete example, i was reminded while prepping the talk that Django’s template framework, while primarily designed around HTML generation, is quite general and therefore capable of generating other data formats as well. At work, i’d built up an entire module of custom code around serializing Bible Knowledgebase data as XML for internal hand-off to our developers. Re-reading the Django book gave me the idea of using Django templates to do this instead. In fairly short order, i was able to rewrite my test example, 80 lines of custom code, with a single clean template and 20 much simpler lines instead.
Wow, Mobile
7 May
Written by: Mobile Ministry Magazine
Just a short post, but I did want to recommend the M3: Mobile post which was posted over at the the BibleTech Conference Blog. Not because it points to MMM – though that is humbling – but because of what was realized for a country when something as simple as a mobile was considered as part of the toolkit for a pastor.
Such moments leave me personally without many words. I would hope though, that for any who have stories of their own, that they too would find some consolation in the fact that in its right context, mobile tech is one powerful minstry agent.
This post originally appeared on Mobile Ministry Magazine



