All opinions expressed are those of the authors and not necessarily those of OSNews.com, our sponsors, or our affiliates.
  Add to My Yahoo!  Subscribe with Bloglines  Subscribe in NewsGator Online

published on 2013-05-12 17:40:00
Kroc Camen "

Howdy, folks! Kroc has decided to let me take over Camen Design for today ? not literally, mind you ? and has given me the opportunity to borrow his podium for this blog entry.

" "

My name is Clint Franklin. I am known on the forums here as ?theraje? (no caps, please). Way, way, WAY back in mid-2011, ol' Kroc chirps at me on IM, saying he had a surprise for me. Not being one who is particularly fond of surprises, I inquired about the nature of this surprise. If I recall correctly, he told me to wait a week while he put on some finishing touches. I think it all boils down to him teasing me.

Well, after a week had passed, he said he was finished, and wanted to send me a video. Now, I know what you?re thinking ? ?Big deal. I just go to YouTube and watch videos all day long.?

But, as I'm sure a few of you will recall, at that time, I was using the very best Internet connection I could afford in my area. 56k dial-up. Not only that, but 56K dial-up that would, on its best days, max out at 28.8K. Even a ?standard? video would be impossible to view via YouTube. In fact, poor Kroc had to virtually obliterate the video quality, to the point where things could be vaguely recognizable. He then had to reduce the picture size down to some ridiculous dimension. Think along the lines of: Barely takes up all the screen space on an average cell phone manufactured in 2003.

I think the final ?preview? video was around 2 megabytes. Of course, it took about 15 minutes to download this 2-meg file. Yes ? 15 minutes to download 2 measly megabytes. And that was pretty decent, for me. And this was less than two years ago.

When I saw the video, I just watched, slack-jawed, as I saw Kroc?s work. Long story short, it described my situation (and included plenty of amusing, yet home-hitting, visuals) in a way people could understand. Because, folks, I tell you what ? you just have no clue how precious data is until you have to wait 20+ minutes for a 3-minute MP3 song to download onto your computer! Or when you can?t browse 90% of the Web because of server timeouts and JavaScript-heavy site architectures.

The real shocker was that this video (in higher quality, of course ? if Kroc had released the ?preview? version publicly, the world would have gouged its eyes out) was part of a campaign to encourage people to donate money so that I could afford the only means of acquiring anything remotely similar to broadband (which would have been satellite Internet ? 3G was completely unavailable in my house).

The reason Kroc wanted to gather up the money was because I had no access to anything faster than 28.8k dial-up, except for satellite ? and not only does it START at $60 a month? you are forced to sign a two-year contract. If you wish to cancel before the two years expires, you are required to pay an early termination fee (several hundred dollars!).

I, being legally disabled and unable to work (and even if I COULD work, I lived out in the boonies, and the nearest grocery store took half an hour to drive to), was certainly unable to afford such. That said, I never was one who liked to ask people for things (I hated the idea of having to apply for disability in the first place, but that changed when it became obvious that I had no other choice). I value self-sufficiency. So, initially, I was a bit perturbed. No? I was sick to my stomach. I didn?t have the heart, at the time, to say ?no? to Kroc on this. He put WAY too much work into it. He was WAY too excited about it.

So, even with the knowledge that not only did I dislike the idea, but also that people would get the urge to assume things (which they did ? calling me a bum, telling me to get a job, and so on, not knowing my situation), and that even if people did find it in their heart to help, that it would not necessarily work out (satellite Internet performance and reliability is very, very dubious). And if that were to happen, I would have wasted those people?s charity. I don?t know if I could have dealt with that.

But, I caved. Kroc wanted so badly for me to have the chance to do the things I love ? working on programming projects, artwork, and so on ? that I couldn?t say no. Plus, the idea of me having the opportunity to work again, doing contract work online, made me feel as though I could at some point become productive and not be at the mercy of a government check.

In the end, we collected over 50% of our goal of $2000 (the total cost of covering the contract period). We stopped short because after catching a lot of flak from those people I mentioned early (the ones who like to ASS-ume things about which they have no understanding), I had basically decided to commit suicide. The world and everyone in it wanted me to suffer, but I'd rather just kill myself and get it over with, I thought.

I regained my composure a few months later, but still went to bed, every night, saying the same prayer to a god I didn?t even believe existed: ?God, please let me go to sleep now, and just never let me wake up again.?

To wrap things up, I spent the following few months in and out of hospitals (both medical and mental), hoping that my life would just end. Then, out of nowhere, something very strange happened. I won?t go into details ? some call it a ?revelation? from God himself? others call it a severe psychotic breakdown? all I can tell you, definitively, is that something changed in me. I regained the will to live.

After my ?psychotic breakdown,? I was put into group therapy. While there, one of the other patients told me about an apartment complex that is set up for people like me who are disabled ? think of it as a retirement community, not for retirees, but for the disabled.

Long story short, a former tenant caused problems at that complex, and the building manager (who had met with me previously) told me she had an opening, and wanted me to move in. That was in October of 2012.

The money donated to me for the campaign Kroc started allowed me to not only pay the deposits for the rent and electricity (which added up to several hundred dollars, and would have kept me out if I were unable to pay them), but to accomplish the original goal ? I now live in an area that has access to DSL Internet service! So long, 28.8 Kbps? hello 12.0 Mbps!!! Goodbye, 6 minutes to download 1 megabyte? Good to see ya, 1 megabyte per second!!!!!!

And now, of course, my life has improved by an order of magnitude from before. The people who donated did not merely help me get on broadband. They gave me a place to stay, an opportunity to get the help I need (medically, psychologically, etc.), to find work (it no longer costs $30 in gas to take a trip to the nearest business!!!), to attend church (I was an atheist for roughly 8 years, until my ?revelation? from God gave me the strength to get out of bed again), to form my first real romantic relationship (wedding bells may not be far off), and to help others and be blessed by the people who are now a part of my life, and would not have been otherwise. Those of you who donated have helped far, far more people than just little old me.

I may have been upset with Kroc starting all of this fundraising jazz in the first place, but now, all I can feel is immense gratitude to him and all of the people who helped ? whether it was by donating money, moral support, a shoulder upon which to cry?

Now that I'm getting all sentimental, I'm just going to say that I'm incredibly blessed to have a God that heard my cries, and had all the right people in place who gave me the strength to push myself forward, to the point where I could waste three dozen paragraphs explaining what could have been said in two simple words:

Thank you.

Yours Truly,

Clint Franklin, aka. ?theraje?
"

Discuss this in the forum


published on 2013-03-20 08:54:00
Kroc Camen

Browser Vendors, You Have Failed Us

Browser vendors have unilaterally lost sight of real problems that plague real users.
I am so angry right now. The thing that causes me so much anger is not that Google are shutting down their RSS reader product, it?s that the browser vendors sat back and allowed all the power over content to go into the hands of Facebook and now Google.

I wrote two years ago that browser vendors were failing to focus on the real problem that: users don?t want, and find it slow and painful, to trudge around their daily round of websites and that the web browser should be exposing an automatic, intelligent and ultimately useful interface to RSS.

Why can I not do something about this? Becuase creating another RSS web service to ?replace? Google Reader does not solve the underlying problem, that is:?personal aggregation of content should not be dependnt on a business model.

Google never offered a pay option. Reader had to supliment other strategies. RSS does not benefit Google+, whose aim is to centralise all the content including the ability to process and access it.

RSS is a browser feature, a browser?s responsibility. It is a personalised view upon the web, just as bookmarks and add-ons are. It makes managing daily content much easier, just as bookmarks and add-ons do. The browser?as the personal portal on to the web?is best positioned to aggregate the web for the user. It knows the user?s browsing habits better than even the most evil of evil advertisers. The browser vendors could make the web faster, easier, less cluttered and junky than any web sevice ever could. And it could do all of that with the barest minimum of privacy-intrusion, without a single ad and without a conflicting business model.

Because browser vendors failed to see personalised aggregation as a benefit to regular users, these regular users have taken to Facebook as their personalised aggregation service, taking the power over content away from the browser vendors.

Facebook will one day soon be a major technology player rivalling Google, Amazon and even Apple. Facebook are already big, yes, but for now they?re ?just a website?. When they control the technology landscape because they control access to the content then things turn very bad for users. Mozilla, prepare to be side-lined by a ?website?.

That brings me to the second big thing browser vendors have failed users with: e-mail.

It is 2013 and there is still no way to set Firefox as the default e-mail client in Windows. There is no way to make it so that when a user right-clicks a file and goes Send To > Mail Recipient that Firefox will launch with the user?s preferred web-mail.

This is no end of headaches for my customers. They are constantly slipping up because they do not discern the difference between actions that invoke the native mail client and the fact they are using web-mail. Functions they expect to work simply don?t, such as using the e-mail toolbar button in Windows Explorer. Most of my customers have unsent e-mails in the outbox of Outlook Express or Windows Mail because the native client was launched instead of their web-mail. Attaching files is an unbelievable pain because of this. Customers have to be carefully taught that no, you don?t go to the picture first, you write the e-mail first, then click attach and then have to understand the concept of a different view upon the file-system and that the Pictures folder in there, is actually the same as the Pictures folder their muscle-memory is programmed to use from the Start Menu.

E-mail sucks because browser vendors don?t care about real problems that plague real users every day.

If I were Mozilla I would integrate e-mail back into Firefox. The browser already knows the user?s web-mail user names and passwords. It could automatically configure everything. The user could have a clean interface to their e-mail without having to go through painful web-mail clients. Attachments would be easier. E-mail links in web pages would actually work. Native OS e-mail actions would actually do the right thing for once. Users would actually benefit more from this than redesigning the f*cking shape of the tabs or removing the RSS button from the toolbar.

Two years have passed. The boat has been missed. Facebook and Google control the content, how it is accessed, how it is processed. There is no way back. You have failed us, browser vendors.

Discuss this in the forum


published on 2013-02-22 10:42:00
Kroc Camen

A Summary

It is with much intrepidation (for life has become very uncertain) and joy (for life is no longer dull) that I can announce the news of our child, a son, due to us in early July.

Life, ever since meeting the love of it, has been upside down and changing at a relentless pace. First we met, and that was a big, unexpected change. Then I asked her to marry me. In three months we were married, and lived together?no small change for myself, which I found to be effortlessly natural (though obviously challanging). It?s only because of the news of our child that we have had to directly tackle the physical piles of stuff still not yet disseminated into everyday life. We find that having not even gotten settled in our first home we have to up-sticks and down-size (where there is no spare room to pile things) to be able to better focus ourselves on our child.

For this though I am very grateful as a blessing from God; meeting my wife has made me address many, many personal, internal burdens which have reflected?on this blog?through me giving up a great many things physical (the MacBook Pro), spiritual and somewhere in between (software projects), whilst the birth of my son forces me to address my many needs outside of the computer world.

This is where we get to the point. It will not have gone without your notice that I have neither been very active, or reliable for the last year. My more immediate needs in the real world overtake me and though even when there is the adequate time to devote to the website and other matters, I have neither the strength or will.

There is much I want to do, but it will have to wait for a few years whilst I care for my family.

I don?t expect to do much blogging here on the main site (my system isn?t working well for me under my new circumstances and it needs a complete overhaul). You can best be kept up to date with my happenings and thoughts through the system that does work well for my circumstances, my forum.

Thank you to all for your patience, understanding, generoisty and care.

Camen Design will return to irregular service in a future iteration some day. What it will be is only a hazy idea right now, but I do know for certain that I will do my own things in my own way and demonstrate to others that they can do the same.

Discuss this in the forum



published on 2012-08-31 10:48:00
Kroc Camen

Transliteration

Transliteration is when you replace individual characters in a piece of text with alternative characters, commonly used on the web to replace accented characters ??èìòù? with their ASCII equivilents ?aeiou? to use as filenames or URLs.

This is my take on the subject that uses different levels of fallback to gaurantee a result whatever your environment: It transliterates better than any example snippet you have seen out there as will be explained in the code and afterwards.

//safeTransliterate v3, copyright (cc-by 3.0) Kroc Camen <camendesign.com>
//generate a safe (a-z0-9_) string, for use as filenames or URLs, from an arbitrary string
function safeTransliterate ($text) {
	//if available, this function uses PHP5.4's transliterate, which is capable of converting arabic, hebrew, greek,
	//chinese, japanese and more into ASCII! however, we use our manual (and crude) fallback *first* instead because
	//we will take the liberty of transliterating some things into more readable ASCII-friendly forms,
	//e.g. "100?" > "100degc" instead of "100oc"
	
	/* manual transliteration list:
	   -------------------------------------------------------------------------------------------------------------- */
	/* this list is supposed to be practical, not comprehensive, representing:
	   1. the most common accents and special letters that get typed, and
	   2. the most practical transliterations for readability;
	   
	   given that I know nothing of other languages, I will need your assistance to improve this list,
	   mail kroc@camendesign.com with help and suggestions.
	   
	   this data was produced with the help of:
	   http://www.unicode.org/charts/normalization/
	   http://www.yuiblog.com/sandbox/yui/3.3.0pr3/api/text-data-accentfold.js.html
	   http://www.utf8-chartable.de/
	*/
	static $translit = array (
		'a'	=> '/[ÀÁÂ????Ã?????????ÅÅ??????????àáâ????ã?????????å?????????]/u',
		'b'	=> '/[??????]/u',			'c'	=> '/[Ç?????ç?????]/u',
		'd'	=> '/[Ð????????????ð]/u',
		'e'	=> '/[ÈË?????????????????????èë?????????????????????]/u',
		'f'	=> '/[??]/u',				'g'	=> '/[??????????????]/u',
		'h'	=> '/[???????????????]/u',		'i'	=> '/[ÌÏ????????????iìï???????????]/u',
		'j'	=> '/[???]/u',				'k'	=> '/[???????????]/u',
		'l'	=> '/[????????????????]/u',		'm'	=> '/[??????]/u',
		'n'	=> '/[Ñ????????ñ????????]/u',
		'o'	=> '/[ÒÖ?????????????????????????????Ø?òö?????????????????????????????ø?]/u',
		'p'	=> '/[????]/u',				'r'	=> '/[??????????????????]/u',
		's'	=> '/[?????????????????????]/u',	'ss'	=> '/[ß]/u',
		't'	=> '/[???????????????]/u',		'th'	=> '/[Þþ]/u',
		'u'	=> '/[Ù??????????????????????ù??????????????????????µ]/u',
		'v'	=> '/[????]/u',				'w'	=> '/[?????????????]/u',
		'x'	=> '/[????×]/u',			'y'	=> '/[Ý????????ýÿ????????]/u',
		'z'	=> '/[????????????]/u',				
		//combined letters and ligatures:
		'ae'	=> '/[Ä?Æ??ä?æ??]/u',			'oe'	=> '/[??]/u',
		'dz'	=> '/[??????]/u',
		'ff'	=> '/[?]/u',	'fi'	=> '/[??]/u',	'ffl'	=> '/[??]/u',
		'ij'	=> '/[??]/u',	'lj'	=> '/[???]/u',	'nj'	=> '/[???]/u',
		'st'	=> '/[??]/u',	'ue'	=> '/[Ü????ü????]/u',
		//currencies:
		'eur'   => '/[?]/u',	'cents'	=> '/[¢]/u',	'lira'	=> '/[?]/u',	'dollars' => '/[$]/u',
		'won'	=> '/[?]/u',	'rs'	=> '/[?]/u',	'yen'	=> '/[¥]/u',	'pounds'  => '/[£]/u',
		'pts'	=> '/[?]/u',
		//misc:
		'degc'	=> '/[?]/u',	'degf'  => '/[?]/u',
		'no'	=> '/[?]/u',	'tm'	=> '/[?]/u'
	);
	//do the manual transliteration first
	$text = preg_replace (array_values ($translit), array_keys ($translit), $text);
	
	//flatten the text down to just a-z0-9 and dash, with underscores instead of spaces
	$text = preg_replace (
		//remove punctuation	//replace non a-z	//deduplicate	//trim underscores from start & end
		array ('/p{P}/u',	'/[^_a-z0-9-]/i',	'/_{2,}/',	'/^_|_$/'),
		array ('',		'_',			'_',		''),
		
		//attempt transliteration with PHP5.4's transliteration engine (best):
		//(this method can handle near anything, including converting chinese and arabic letters to ASCII.
		// requires the 'intl' extension to be enabled)
		function_exists ('transliterator_transliterate') ? transliterator_transliterate (
			//split unicode accents and symbols, e.g. "Å" > "A°":
			'NFKD; '.
			//convert everything to the Latin charset e.g. "?" > "ma":
			//(splitting the unicode before transliterating catches some complex cases,
			// such as: "?" >NFKD> "20?" >Latin> "20ri")
			'Latin; '.
			//because the Latin unicode table still contains a large number of non-pure-A-Z glyphs (e.g. "?"),
			//convert what remains to an even stricter set of characters, the US-ASCII set:
			//(we must do this because "Latin/US-ASCII" alone is not able to transliterate non-Latin characters
			// such as "?". this two-stage method also means we catch awkward characters such as:
			// "?" >Latin> "k?" >Latin/US-ASCII> "kO")
			'Latin/US-ASCII; '.
			//remove the now stand-alone diacritics from the string
			'[:Nonspacing Mark:] Remove; '.
			//change everything to lowercase; anything non A-Z 0-9 that remains will be removed by
			//the letter stripping above
			'Lower',
		$text)
		
		//attempt transliteration with iconv: <php.net/manual/en/function.iconv.php>
		: strtolower (function_exists ('iconv') ? str_replace (array ("'", '"', '`', '^', '~'), '', strtolower (
			//note: results of this are different depending on iconv version,
			//      sometimes the diacritics are written to the side e.g. "ñ" = "~n", which are removed
			iconv ('UTF-8', 'US-ASCII//IGNORE//TRANSLIT', $text)
		)) : $text)
	);
	
	//old iconv versions and certain inputs may cause a nullstring. don't allow a blank response
	return !$text ? '_' : $text;
}

Edit this code on GitHub • You may do anything with this code as long as you leave credit in the code

There is no ?guaranteed available? method with which to transliterate effectively in PHP; the functions that can do so vary by PHP version and are not likely to always be installed and enabled on every PHP server out there. The only built-in function strtr guaranteed to be present only replaces one character with another and doesn?t handle the common need to expand one character to multiple, such as converting ?ß? to ?ss?.

There are a number of libraries and functions out there for transliteration. Those that are comprehensive are massive and therefore total overkill for a small project and often have unhelpful licences, those that are small and compact are usually very incomplete and rely upon a single method that might not be available to you.

My method uses fallbacks so as to guarantee a result and improves upon other methods out there:

Better unicode normalisation
All the transliterations examples I have seen out there that use PHP5.4?s transliterator make the mistake of copy-pasting the example normalisation string given on the website. The results are simply wrong. My code uses a unicode normalisation method that I have worked out that has not been used anywhere else I have seen. It handles thousands of cases that no other library/function does because it uses two-stages of transliteration, first from any script to Latin-1 and then from Latin-1 to US-ASCII. This means that characters such as ??? become ?ko? where else this would fail on other code I have seen because it would transliterate ??? to ?k?? and then remove the ??? for being non-ASCII
Readability
Since the transliteration will be used for filenames or URLs, readability is important, so it?s better to convert some things to more meaningful words such as ?¥? to ?yen? instead of just ?y?. In the example above, it would be trivial for the function to convert ??? to ?k-ohm? but I chose not to since the single character ??? is almost never used on the `Web

I don?t know anything about other languages and writing systems, so if there?s something amiss in my code, please let me know via email, the forums or by editing the GitHub gist

Discuss this in the forum


published by noreply@blogger.com (Zed Jensen) on 2012-08-24 17:53:00 in the "company" category

Everyone here at End Point has been busy lately, so we haven?t had as much time as we?d like to blog. Here are some of the projects we?ve been knee deep in:

  • The Liquid Galaxy Team (Ben, Adam, Kiel, Gerard, Josh, Matt) has been working on several Liquid Galaxy installations, including one at the Monterey Bay National Marine Sanctuary Exploration Center in Santa Cruz, and one for the Illicit Networks conference in Los Angeles. Adam has also been preparing Ladybug panoramic camera kits for clients to take their own panoramic photos and videos. The Liquid Galaxy team welcomed new employees Aaron Samuel in July, and Bryan Berry just this week.
  • Brian B. has been improving a PowerCLI script to manage automated cloning of VMware vSphere virtual machines.
  • Greg Sabino Mullane has been working on various strange PostgreSQL database issues, and gave a riveting presentation on password encryption methods.
  • Josh Tolley has been improving panoramic photo support for Liquid Galaxy and expanding a public health data warehouse.
  • David has been at work on a web-scalability project to support customized content for a Groupon promotion, while continuing to benefit from nginx caching. He has also been working on the design of highly-available PostgreSQL clusters with multiple indepdent synchronization requirements, and SEO maintenance work on an Interchange-driven site.
  • Ron has been adding shop functionality and DevCamps to several client websites.
  • Phin has been working on a Django-based inventory app to help End Point keep track of servers, virtual machines, updates, backup verification, and other details about our hosting, monitoring, and other infrastructure concerns.
  • Steph has been busy on a Piggybak Ruby on Rails 3 project that is scheduled to launch soon, and she continues to work on other Rails and Interchange projects.
  • Jeff has been integrating support for promotion codes for two clients? websites, and adding a third-party database support to another client website.
  • Carl set up automated emails for expiring subscriptions, added a separate website that runs from a client?s main admin, and set up a way to show product pages in a third-party website within an iframe.
  • Josh Williams recreated an existing environment in Amazon Web Services EC2 instances and helped multiple clients with streaming replication on PostgreSQL.
  • Phunk has been busy wrapping up a large Rails 3 project and is transitioning to another large Rails 3 with a nice API and elegant metadata management using ElasticSearch, CouchDB, OAuth2 and jQuery.
  • Marina has been working on several Rails projects, including building out a new Rails 3.2 site with RailsAdmin and integration of several third-party community rich features.
  • Greg D. has been building out functionality to help users create data visualizations for another client using Django and Weave. He also recently gave a company presentation on popular JavaScript libraries.
  • Jon has been interviewing candidates for our Ruby on Rails developer position. There have been lots of strong applicants. He?s also been looking into Git?s post-checkout hook for some added automation, troubleshooting some RPM build problems, and adding Rails (for RailsAdmin) to an existing Sinatra site via some neat nginx configuration. And he continues to be surprised by how bad Amazon?s EC2 I/O and CPU performance can be.
  • Mark set up PayPal for two Interchange clients and set up saved credit cards via Authorize.Net CIM integration for another.
  • Mike has been busy at work on a large scale Spree project building out custom support for custom CSS and account management integration.
  • And finally, Rick has been holding down the fort which includes integrating new clients, keeping our many current clients happy, managing company finances, and keeping the machine running and well-oiled overall!

As you can see, we?ve got a lot of variety here, so let us know if you?d like to hear more on any of these topics, or if some features we?ve developed for others may be useful to you.


published by noreply@blogger.com (Marina Lohova) on 2012-08-24 14:00:00

I wrote about Radian6 in my earlier blog post. Today I will review one more aspect of Radian6 API - call pagination.

Most Radian6 requests return paginated data. This introduces extra complexity of making request several times in the loop in order to get all results. Here is one simple way to retrieve the paginated data from Radian6 using the powerful Ruby blocks.

I will use the following URL to fetch data:
/data/comparisondata/1338958800000/1341550800000/2777/8/9/6/

Let's decypher this.

  • 1338958800000 is start_date, 1341550800000 is end_date for document search. It's June, 06, 2012 - July, 06, 2012 formatted with date.to_time.to_i * 1000.
  • 2777 is topic_id, a Radian6 term, denoting a set of search data for every customer.
  • 8 stands for Twitter media type. There are various media types in Radian6. They reflect where the data came from. media_types parameter can include a list of values for different media types separated by commas.
  • 9 and 6 are page and page_size respectively.

First comes the method to fetch a single page.
In the Radian6 wrapper class:

def page(index, &block)
  data = block.call(index) 
  articles, count = data['article'], data['article_count'].to_i  
  [articles, count]
end

A data record in Radian6 is called an article. A call returns the 'article' field for a page of articles along other useful fields.

Now we will retrieve all pages of data from Radian6:

def paginated_call(&block)
  articles, index, count = [], 0, 0
  begin
    index += 1
    batch, count = page(index, &block)
    articles += batch 
  end while count > 0
  articles
end

Time to enjoy the method! I'm using httparty gem to make requests to API.

paginated_call do |page|
  get("/data/comparisondata/1338958800000/1341550800000/2777/8/#{page}/1000/")
end

Thanks for flying!


published by noreply@blogger.com (Steph Skardal) on 2012-08-21 14:37:00

Before I got married, I used a gmail account associated with my maiden name (let's call this account A). And after I got married, I switched to a new gmail address (let's call this account B). This caused daily annoyances as my use of various Google services was split between the two accounts.

Luckily, there are some services in Google that allow you to easily toggle between two accounts, but there is no easy way to define which account to use as the default for which service, so I found myself toggling back and forth frequently. Unfortunately, Google doesn't provide functionality to merge multiple Google accounts. You would think they might, especially given my particular situation, but I can see how it's a bit tricky in logically determining how to merge data. So, instead, I set off on migrating all data to account B, described in this email.

Consider Your Google Services

First things first, I took at look at the Google Services I used. Here's how things broke down for me:

  • Gmail: Account A forwards to account B. I always use account B.
  • Google+: Use through account A.
  • Google Analytics: Various accounts divided between account A and account B.
  • Blogger: Use through account A.
  • Google Calendar: Various calendars split between account A and account B.
  • Google Documents: Various documents split between account A and account B.
  • Google Reader: Don't use.
  • Google Voice: Use through account B.
  • YouTube: Don't use (other than consumption).

After reviewing this list, I determined I would have to migrate Google+, several Google Analytics accounts, Blogger, Google Calendar, and Google Documents. I set off to look for various directions for merging or migrating data, broken down below.

Google+

Google Plus was easy to migrate. I followed the directions described here, which essentially involves sharing circles from account A to account B and then importing circles in account B. It was quick and easy.

Google Analytics

Google Analytics was a little more time consuming. In all accounts assigned to account A, logged in as account A, I added account B as an Admin user. Then, I logged in as account B, downgraded account A to a regular user from admin and deleted account A. Note that you must downgrade an account before you are allowed to delete the user, from my experience.

Blogger

To migrate Blogger account settings, I invited account B to a blog logged in as account A in browser #1. In browser #2, I logged in as account B and accepted the invitation. In browser #1, I gave account B admin access logged in as account A. After verifying account B admin access in browser #2, I went back to browser #1 and removed account A from the blog. I repeated these steps until I had transitioned all blogs.

Google Documents

The Google Documents migration was by far the most time consuming data migration for all the services. This article from Lifehacker says, "If you're migrating to a regular Google account, transferring your Google Docs is easy. Just select all the documents you want to migrate, go to the More Actions drop down menu, and choose Change Owner. Type in Account 2's address in the box that comes up. You'll see all your documents in Account 2." For about 50% of the documents owned by account A, I was able to change the owner under the shared options from account A to account B.

But for an unexplained reason, I was not allowed to re-assign the owner for the remaining documents. I couldn't find any explanation why this was the case. So, I migrated the data by brute force: I downloaded the remaining data owned by account A's account, and uploaded it as account B. This was irksome and time consuming, but it was my last step in finishing the migration!

Associated Email Accounts

One quick change I had to make here was to remove my End Point email association with account A and add it to account B, so that any documents shared with my End Point email address would be visible by account B. This was done under Google Account Settings.

Conclusion

The time spent on the account migration was worth it, in retrospect! There are many available resources for merging other Google Services if you find yourself in a similar position. Google it ;)






published by noreply@blogger.com (Szymon Guz) on 2012-08-20 15:37:00 in the "postgres" category

When I work for multiple clients on multiple different projects, I usually need a bunch of different stuff on my machine. One of the things I need is having multiple PostgreSQL versions installed.

I use Ubuntu 12.04. Installing PostgreSQL there is quite easy. Currently there are available two versions out of the box: 8.4 and 9.1. To install them I used the following command:

~$ sudo apt-get install postgresql-9.1 postgresql-8.4 postgresql-client-common

Now I have the above two versions installed.

Starting the database is also very easy:

~$ sudo service postgresql restart
 * Restarting PostgreSQL 8.4 database server   [ OK ] 
 * Restarting PostgreSQL 9.1 database server   [ OK ] 

The problem I had for a very long time was using the proper psql version. Both database installed their own programs like pg_dump and psql. Normally you can use pg_dump from the higher version PostgreSQL, however using different psql versions can be dangerous because psql uses a lot of queries which dig deep into the PostgreSQL internal tables for getting information about the database. Those internals sometimes change from one database version to another, so the best solution is to use the psql from the PostgreSQL installation you want to connect to.

The solution to this problem turned out to be quite simple. There is a pg_wrapper program which can take care of the different versions. It is enough to provide information about the PostgreSQL version you want to connect to and it will automatically choose the correct psql version.

Below you can see the results of using psql --version command which prints the psql version. As you can see there are different psql versions chosen according to the --cluster parameter.

~$ psql --cluster 8.4/main --version
psql (PostgreSQL) 8.4.11
contains support for command-line editing
~$ psql --cluster 9.1/main --version
psql (PostgreSQL) 9.1.4
contains support for command-line editing

You can find more information in the program manual using man pg_wrapper or at pg_wrapper manual


published by noreply@blogger.com (Jeff Boes) on 2012-08-13 13:30:00 in the "Interchange" category

A very common, somewhat primitive approach to Interchange searching uses an approach like this:

The search profile contains something along the lines of --

  mv_search_type=db
  mv_search_file=products
  mv_column_op=rm
  mv_numeric=0
  mv_search_field=category

[search-region]
  [item-list]
    [item-field description]
  [/item-list]
[/search-region]

In other words, we search the products table for rows whose column "category" matches an expression (with a single query), and we list all the matches (description only). However, this can be inefficient depending on your database implementation: the item-field tag issues a query every time it's encountered, which you can see if you "tail" your database log. If your item-list contains many different columns from the search result, you'll end up issuing many such queries:

[item-list]
    [item-field description], [item-field weight], [item-field color],
    [item-field size], [item field ...]
  ...

resulting in:

SELECT description FROM products WHERE sku='ABC123'
SELECT weight FROM products WHERE sku='ABC123'
SELECT color FROM products WHERE sku='ABC123'
SELECT size FROM products WHERE sku='ABC123'
...

(Now, some databases are smart enough to cache query results, but some aren't, so avoiding this extra work is probably worth your trouble even on a "smart" database, in case your Interchange application gets moved to a "dumb" database sometime in the future.)

Fortunately, it's easy to correct:

mv_return_fields=*

and then

...
    [item-param description]
...

in place of "item-field".


published on 2012-08-12 13:34:00
Kroc Camen

End of an Era

The world has changed around me since I started this blog, and then I have seen a good deal of change in myself. When presented recently with the issue that my aged MacBook Pro can?t be upgraded to the latest OS X, the logical thing?as far as I'm concerned?would be to switch to some FreeBSD variant and get away from all this iCloud and closed-computing nonsense.

However I am in the thows of change once more and I have opted to sell that which has been my right arm for years. I was neither shrewd nor conscientious with my money when I dated my wife, which was my own fault, added to the unfathomable expense of getting married and moving home. To that end, where normally I would have the money for my tax bill, rightly I don?t. But that is not the reasoning behind this decision. I can earn and I can save, however, I wish not to place my electronic pursuits above the attention I wish to insist upon my wife and my home.

For those that might genuinely desire these items, I highlight them here; my laptop I'm not so bothered about, but my collection of rare Commodore 64 books I would like to find the right eyes who may use them. Whilst I am in the UK, I would consider international shipping for my C64 items as long as you contact me privately.

Onwards and upwards!

Discuss this in the forum


published on 2012-08-11 15:42:00
Kroc Camen

Announcing PhotoDemon:
A Fast, Free, Open-Source Image Processor

tannerhelland.com/4183/photodemon-image-processor-vb6/

Myself, and my good friend Tanner Helland grew up in a scene that revolved around Visual Basic 6.

Much hated by ?real programmers? for not being a ?real language?, Visual Basic 6 struck a chord with the common populous unlike anything since. For a very business-orientated product, a huge scene grew up around teens experimenting with the language.

For all the hate it got, my choice in using it was one of the wisest I made. Software I wrote over 10 years ago still works now and will still work throughout the lifespan of Windows 8. Those who adopted .NET could not say the same and have been dragged along Microsoft?s eclectic upgrade-train, with every new idea thrown in along the way by a directionless Microsoft failing to practice anything they preach (.NET is the future! Silverlight is the future! C# is the future! HTML5 is the future!)

So, it is of deep personal joy for me to link you to some 12 year old software which has only just been released!

I have known PhotoDemon for a long time. Tanner has been sending me copies for over a decade. The wolrd may have changed rapidly around me in those years?Apple went from dead to the No.1 company in the world and Microsoft lost their grip on the ?Web?but PhotoDemon has matured slowly, like a fine wine.

Application design in general has changed fads immensely since the days of PhotoDemon Tanner has included some nice old screenshots showing just how immensely! and though what Tanner started out with couldn?t be further removed from the ?apps? of today, the recent changes in UI leading up to this release have been most profound. In 2003 I sent Tanner a massive 20-page e-mail detailing everything I could criticise on the UI-front. In those nine years my design skills have changed irrevocably so I understand how making PhotoDemon look so good today for, let?s remind ourselves, a VB6 program is such an achievement for Tanner who never admitted to knowing much about UI.

So, go check out Tanner?s announcement, read the history and see the screenshots of a program 12 years in the making!

Discuss this in the forum


published on 2012-08-05 14:12:00
Kroc Camen

Camen Design Competition Time!

  1. Design a Theme for NoNonsense Forum
    1. Get Started:
    2. What You?re Aiming For:
  2. Design a Web Page for NoNonsense Forum
    1. Get Started:
    2. What You?re Aiming For:
  3. Prizes, Judging, Rules
    1. Prizes
    2. Judging Criteria
    3. How to Enter
    4. Rules

Here is an opportunity to create something and learn from others; Camen Design is running not one, but two simultaneous competitions (so that you have a choice) centered around my unique forum software NoNonsense Forum; don?t worry if you?ve never heard of it, let alone used it, all that is required is:

  • Some basic HTML / CSS knowledge
  • The want to contribute and learn

These are the two competitions:

  1. Design a Theme for NoNonsense Forum
  2. Design a Web Page for NoNonsense Forum

and they run from Sunday 5th of August, for just over two calendar months,
until midnight UTC Sunday 7th of October. See prizes, judging and rules for the ancillary details.

Design a Theme for NoNonsense Forum

Your mission, should you choose to accept it, is to turn this:

The default NoNonsense Forum theme ?greyscale?

?into anything you want. Go understated or go wild, simply create a new theme as you see fit.

Do not worry, as you do not need to know PHP or be familiar with NoNonsense Forum to develop a theme for it. NNF uses a unique templating engine that allows you to use plain HTML and CSS and you never need to learn any {{special syntax}} or use PHP (unless you want to).

Get Started:

What You?re Aiming For:

You should refer to the judging criteria for guidance as this competition is very open to creativity.


Design a Web Page for NoNonsense Forum

Your mission, should you choose to accept it, is to design and create a single-page website for NoNonsense Forum.

Currently, NoNonsense Forum has no real ?website? to advertise it, just the technical project page on Camen Design, which is more of a blog post than a proper web site for it, and the GitHub project, which doesn?t exactly ?sell? the product!

The NoNonsense Forum GitHub project page

Get Started:

What You?re Aiming For:

  • The web page can be as long or short as you want but it should highlight the features (or not-features) of the forum and provide a link to download it (github.com/Kroc/NoNonsenseForum/zipball/master) and optionally a link to the GitHub project

  • NoNonsense Forum is aimed at individuals who would want to install and run it themselves, including technical persons within companies that might want to use it as an internal discussion platform; that is, NNF is not aimed at managers, but rather the people who have the technical skill to install it and potentially modify it?They are well aware of what a pain phpBB is. For example, NNF has received this testimonial:

    "

    I work for Life is good and handle their media and web design in Portsmouth. I've used NNF as an internal discussion board and communication platform. This has eliminated the messy and poor communication through paper notes. Our company?s processes and communication has improved greatly. We haven?t had miscommunication since the birth of NNF at Life is good. Thank you for this.

    NickPfen
    "
  • Forums appear antiquated compared to all this Facebook and Twitter nonsense, so the site should help convince visitors why NNF doesn?t suck and why a NoNonsense Forum is a good discussion platform


Prizes, Judging, Rules

Prizes

I lied. There?s not really any prizes, perhaps not the kind you were expecting. You see, I don?t have the money to contribute a physical or monetary prize. The purpose of the competitions is to encourage participation, sharing and creativity. This is an opportunity to play with HTML / CSS and bounce ideas off of others doing the same. There is no such thing as ?stealing? here, just learning. You?re encouraged to share your ideas, designs and code in the forum and see what others are coming up with.

Grand Prize:

The overall winner of the theme competition will have their theme used on the Camen Design Forum for one month, possibly longer if I like it.

The overall winner of the webpage competition will have their design used as the official NoNonsense Forum site over at GitHub.

The SRSBSNS Award:

This immaterial feel-good award will be given to the best entry (in each competition) that takes itself seriously. That is not to say that it can?t be fun, or has to dull and bland, but that it aims to be a real design to be used for its purpose, either as forum theme that would be shipped with the product, or a webpage that would serve as the starting point of someone discovering the product for the first time.

The ORLY? Award:

Awarded to the best entry (in each competition) that does not take itself seriously.

The People?s Choice Award:

What was everybody?s favourite entry, voted by everybody on the forums. This is so that there can be an agreed upon ?favourite? without any ?criteria? to meet.

Runners Up:

The top 5 of each competition will be featured on Camen Design with my personal, detailed critique as a designer and programmer.

Judging Criteria

Myself (Kroc Camen) will be judging (except for the People?s Choice Award which will be a rough vote held on the forum).

Who am I that you would care? This site has been HTML5 with no divs, no spans and the CSS has no IDs & no classes, since 2008. I made Video for Everybody, the HTML5 video-embedding method mentioned in most anywhere HTML5 video is discussed.

These are the things I?ll be looking for:

i. Trueness to spirit

That is, how well the entry succeededs in being true to its nature. If your entry is supposed to be ?retro? or ?industrial? or even ?lolcats?, then I will be ranking based on how well your entry hits the zeitgeist. Is your design and execution close to what you purposed / intended it to be?

Entries with a schizophrenic / uncertain nature would rank poorly. Try be clear in what you want to achieve and what ?statement of design? you are making. Be bold, and stick to it.

ii. Creativity

Make stuff nobody else thought of. Find your own niche where you find pleasure and dig into it.

Extra kudos is also awarded for creatvity with the code. Clean, artistic HTML and CSS is awarded. Especially with the theme competition, kudos is awarded for twisting the HTML and the common idea of what a forum should look like.

iii. Completeness / compatibility

Extra kudos is awarded for those who can cover more ground in the time. Does it include a mobile theme (via CSS3 media queries)? Printing styles? Does it work without JavaScript? What range of browsers does it work on?

You shouldn?t focus on this to begin with though. Get the look and feel right and then with spare time you can work on broadening the features.

How to Enter

To enter a competition, just start a thread in the forum with the title prefixed with ?NNF Compo Theme? or ?NNF Compo Webpage? and the name of your theme. In this thread you can describe your idea, post some images of the design if you?ve drawn any and share code.

You can keep replying or appending to the thread to alert others of your progress and others can give you their feedback through your thread. It?s best to post early and log your progress as you go rather than hold everything back until the end of the competition.

Any time before the deadline just add a link to a download of your entry to your thread. You can continue to update your entry even after you?ve posted a download as long as it?s still before the deadline.

To cancel an entry, just delete your thread.

Rules

  • The competitions run from Sunday 5th of August, for two calandar months and two days, ending at midnight UTC Sunday 7th October

  • You can enter both competitions if you want, and you can have more than one entry for each, but you will only be represented once in each prize category by your best entry

  • Please licence your code correctly to avoid your entry being rejected:

    • You should ideally use a Creative Commons CC-BY 3, or CC-BY-SA 3 licence, especially if you have derived your theme from the default ?greyscale? theme

    • Please us MIT or BSD if you prefer these, but not Apache2 / MPL / WTFPL

    • Do not use any GPL licence, or dual-licence that includes GPL,
      your entry will be rejected if you do

Anything you?re unsure of, just ask at the forums.

Discuss this in the forum


published by noreply@blogger.com (Brian Gadoury) on 2012-08-02 15:29:00

Sometimes bugs in other people's code makes me think I might be crazy. I?m not talking Walter Sobchak gun-in-the-air-and-a-Pomeranian-in-a-cat-carrier crazy, but ?I must be doing something incredibly wrong here? crazy. I recently ran into a Rails 3 ActiveRecord caching bug that made me feel this kind of crazy. Check out this pretty simple caching setup and the bug I encountered and tell me; Am I wrong?

I have two models with a simple parent/child relationship defined with has_many and belongs_to ActiveRecord associations, respectively. Here are the pertinent bits of each:

class MimeTypeCategory < ActiveRecord::Base
  # parent class
  has_many :mime_types

  def self.all
    Rails.cache.fetch("mime_type_categories") do
    MimeTypeCategory.find(:all, :include => :mime_types)
  end
end

class MimeType < ActiveRecord::Base
  # child class
  belongs_to :mime_type_category
end

Notice how in MimeTypeCategory.all, we are eager loading each MimeTypeCategory?s children MimeTypes because our app tends to use those MimeTypes any time we need a MimeTypeCategory. Then, we cache that entire data structure because it?s a good candidate for caching and we like our app to be fast.

Now, to reproduce this Rails caching bug, I clear my app?s cache using 'Rails.cache.clear' in the rails console, then load any page in my app that calls MimeTypeCategory.all. The page loads successfully and shows no errors. Doesn?t sound like a bug so far, right? If I load that same page a second time, I will get the standard Rails error page with:

undefined class/module MimeType
...
(app/models/mime_type_category.rb:17:in 'all')

Crazy, right? Why does it *appear* that one cannot cache model instances in Rails, and why did it work for exactly one page request after the Rails cache was cleared? Well, the former obviously cannot be true, and the latter is due to how Rails.cache.fetch handles cache misses and cache hits. For a cache miss, Rails.cache.fetch executes its block, serializes the return value, saves it to your cache store, then returns the block?s return value directly. For a cache hit, it reads the cached block from your cache store, deserializes it into whatever objects it identifies itself as, and returns that.

This is all well and good until you?re going along, innocently working on your app in the development Rails environment with config.cache_classes = false (which forces your app to lazy-load requested classes for each page request.) In that situation, Rails will try to deserialize the cached data structure that had references to the MimeType class. But, Rails may not have loaded the MimeType class at that point, so deserialization will fail and produce the error we see there. If you have other code paths in your app that do happen to load the child class before this type of cached parent/child class data structure, you might not hit the bug. Now you?ve entered a world of debugging pain.

I?m not about to give up on automatic class reloading in my development environment, and I don?t want to remove the cached eager loading of my child MimeTypes class because it?s sweet. So, after some digging, I discovered a solution: require_association. Adding ?require_association ?mime_type? to my parent MimeTypeCategory class forces Rails to load the MimeType model when it loads the MimeTypeCategory model such that it can always deserialize the cached data structure successfully. I?ve used require_association in the same way for other instances of the same caching bug in our app as well.

Hopefully this explanation helps people avoid some of the pain I experienced while trying to determine if it was a Rails bug/feature or if I had finally gone insane. I should point out that some of the reading I?ve done suggests ?require_dependency? is the more appropriate solution for this problem. I?ve verified that require_association works in all my cases, but to avoid ?programming by coincidence,? I am going to snoop around the Rails core to understand the difference between the two.

Lastly, please remember: You can?t board a Pomeranian - they get upset and their hair falls out.


published on 2012-08-01 12:45:00
Kroc Camen

The Word to End All Words

Like a black monolith you stand.
Thy fearful symmetry.

Upon you is engraved a single word; a magic word,
More powerful than the utterance of Jadis, the queen of Charn,
who ended all life in her world by the Deplorable Word.

It is a word they do not understand.
From birth they have not known it.
It has not been taught, and neither has it been searched for.

By your word kingdoms have been flattened,
Dynasties felled, endless wars begun.
Lives torn apart and thrown asunder.

They do not know how to comprehend it.
It confuses them, frustrates them.
They bash against you, enraged at your silence.

Why do you not respond!?

But you do not respond.
Your silence causes all their machinations to fall apart;
The noise their livelihoods have come to depend upon.

When your silence has drowned out their noise,
Then peace and quiet will ring out everywhere.
For you are the word to end all words: No.

Discuss this in the forum