Brave Face
Jul27

Brave Face

A sword once pierced my heart, in a place you cannot see. Old wounds concealed, yet still appear to me. I kissed your lips once softly, on a shore beside the sea. Old love has faded; true love is me. My past is but a River, cutting a way across memory. New floods are what we know of, the River left is me.

Read More
When feeling hungry, feels good
Jul24

When feeling hungry, feels good

The cliche of Start-up Culture A saying you often hear in start-up culture is that a budding entrepreneur must “stay hungry to succeed”. The connotation being that the hunger for their goal drives them, but at this point it’s essentially a meaningless cliche don’t you think? Have you ever been hungry though in the real physical sense? Like you need to eat something because your body needs it? Of course you have, everyone has, it’s part of being human and it’s normal… for short periods of time. An important psychological component to hunger is knowing you will eventually eat something. The guaranty that you will feast once again means the difference between starvation and destitution, or simple inconvenience. The same applies for start-ups, except you never really know whether your product will succeed enough to feed you and satiate your hunger. What you do instead is go through the motions of what it takes to succeed, like a hunter tracking prey and having his weapon ready to kill. But the hunter never really knows whether he’ll come home with dinner, he just does everything he can to ensure that he’s prepared to do so. That brings us to the rest of the post. What I want to do is draw similarities between my quest for weight loss and my quest for start-up success with Crowdscriber. My hope is that it resonates with other people who are on the same path in their lives as entrepreneurs. I hope you come to the realization, or at least solidify your resolve in the fact that it is indeed the hard work and perseverance that at the end of the day nets you the results you desire in just about every aspect of your life. Good times Back in 2008 I was on top of the world. I had been a long-time IRCitizen, but hadn’t really used it much to talk to people about programming. Well, actually that’s not true. In the late 90s I was an op of the channel #computer_programmer over on EFNet, in fact computer-programmer.org was the first domain I had ever registered (I still have it to this day, although I’ve never done a thing with it). On this channel we actually didn’t discuss much programming, it was like a hangout for a bunch of people who were scattered throughout the world and were probably never going to meet IRL but nonetheless shared a common interest/profession in programming. At some point in the early 2000s I made the jump over to freenode, and during my daily programming tasks I started using a pastebin called “Paper Napkin”. I had found...

Read More
Scala Self-Types and the Promises You Keep
May11

Scala Self-Types and the Promises You Keep

If you’ve been writing Scala code for any length of time you’ve inevitably come across the following syntax: class UserService() { this: OAuthProvider => def setAccessToken(user: User, authToken: String) { val accessToken = requestAccessToken(authToken) user.accessToken = accessToken } } Ok, immediately you might say “what’s going on with ‘this'”? this: OAuthProvider => That’s what we call a “self-type” declaration in Scala… but what does it do? The hint lies in the setAccessToken function and its use of some mysterious function. Is it me, or is requestAccessToken not defined anywhere? And no, I didn’t neglect to show you an import that brought that function in. Instead, the requestAccessToken function is actually defined on the OAuthProvider trait, like so: trait OAuthProvider { def requestAccessToken(authToken: String) } “Ok”, you may say, “it’s not like we are instantiating an instance of a class that extends OAuthProvider anywhere in our code right?”. That’s true, and that’s why this self-type syntax seems so foreign to the uninitiated. By adding this: OAuthProvider => at the top of our class, Scala accepts a promise from us, so to speak. A promise to, at instantiation time, provide a class or trait that implements the OAuthProvider trait for us. What does that remind you of? To me, it reminds me of “Dependency Injection” and that’s why it is the core concept behind the Cake Pattern. Instead of relying on a dependency injection framework such as Spring or Guice to “wire” our dependencies, we instead rely on Scala’s ability to infer when our class has all its self-types satisfied. Being explicit about your self-type I’m actually not a huge fan of declaring self-types using the this: syntax. Instead I like using an alias other than this Here’s an example similar to the one above from my product Crowdscriber: class LinkUserService() { oauthProvider: OAuthProvider => def setLinkAuthToken(userId: String, service: String, token: String): String = { //not doing anything with the service param yet oauthProvider.createAndStoreCredential(userId, token) } } Notice how I didn’t use the default name this for my variable? I instead called it oauthProvider and then used that alias inside the setLinkAuthToken as if it were a field injected into my class, akin to the classic way you might utilize a field injected by Spring or Guice. Scala will complain at compile-time if I don’t mixin an implementor of OAuthProvider when I want to use my LinkUserService, so I need to either declare a new class like so: case class GoogleLinkUserService() extends LinkUserService with GoogleOAuthProvider or, mixin the implementing trait at declaration time: val googleLinkService = new LinkService() with GoogleOAuthProvider The difference between what Scala gives us with it’s self-type versus...

Read More
A Programmer’s Guide to Japanese
Apr28

A Programmer’s Guide to Japanese

おげんきですか? That means “How’s your health” in Japanese, it’s a typical greeting you may use when seeing a friend for the first time after a long period. In English the closest colloquial convention might be “Hi, how are you?”. But you don’t really care about that do you? You care more for the fact that I, Craig Tataryn a native English speaker with only a few months of study in Japanese, can read those “crazy characters” and make any sense out of them. It’s true, I assure you! The real crazy thing? It only took me a few weeks to learn how to write and pronounce every single Japanese word.  If someone were to speak a Japanese word to me, I could write it.  If someone wrote a Japanese word, I could pronounce it. This is not because I’m some sort of linguistic savant , it’s because Japanese is actually very concise in both written and spoken form, and logical in how words are constructed. Two aspects of language I am already familiar with in my craft of Programming. What’s the point of this blog post? I just find Japanese interesting and I think it’s because I’m a programmer. So read on as I draw some parallels between Japanese and programming concepts, at the very least you too might start to see the logic in the language and be able to decipher those “crazy characters”. がんばって! (good luck!) Concise English is not concise. If I were to say to someone after they explained a concept to me “that was very concise” what I probably mean is that the person used a lot of $5 dollar words and they didn’t explain it in more than one way. They just explained the concept in the most “concise” way possible. An example: “What is a Set?” Concise Answer: “A Set is a collection of distinct objects“ That’s probably the bare minimum amount of words you could use to describe what a Set is making it a concise explanation. However this type of conciseness is not what I’m referring to when I say the Japanese language is concise. No, what I mean is the Japanese don’t, except in a few instances, have zany rules which state, such as in English, that “a character may change its sounds depending on the characters adjacent to it” Case in point: Parmesan Let’s just focus on the “P” here. It has the sound “puh” in this word. Now how about “Pharmacy“? All of a sudden our “P” sounds like an “F”! All because there is a rule which states “if a P precedes an H, they combine to be pronounced fa“. How about the “san” part? Is it “san” as...

Read More
Crowdscriber.com is live!
Sep07

Crowdscriber.com is live!

Our name search was a good exercise, we actually ended up with a consensus for the name Scribe Hive.  However I couldn’t get the domain name. So we decided to stick with our original name of Crowdscriber. With that, I’m please to announce that Crowdscriber.com is live!  It’s purely an informational site for now, it describes the product and allows content creators the ability to sign up for our beta. Have a look around and please feel free to leave your comments about the site here!...

Read More