Facing Failure

My Theme Was Rejected

Before it was approved.

In fact, we’ve had 2 themes rejected on Themeforest for various reasons and only now will I admit that I was angry. I was mad! Mad at the reviewers, counting clicks they’ve made reviewing my themes. Mad at myself for developing something that isn’t approved. Mad at the universe for putting me in this position ( I could just have found a case full of money instead of all this… ). How much did that help? Zero. It only led to

Burning Out

Self pity. Anger. Frustration. Fear. I experienced it all, and it seems that the more I felt any of these emotions, the more I got similar ones. I thought I am never going to get out of it.

For good reason.

I quit my job in January with very limited funds in my pocket. Having done that, I had a motivator that basically says “either you’ll learn how to swim or you’ll sink” was pretty motivating, until I had to face rejection. Once it was introduced, it was like having someone at the shore shouting: “Give up! You can’t swim, just let go and drown already”. Not motivating at all. Which caused the (what seemed to be the) endless misery.

Just do it.

I have no idea what did it for me. It may be that I was already expecting that. I wanted to say prepared, but you just can’t be prepared for that sort of thing, and you’re not even going to get what you we’re expecting as well.

So after all the rejection, and having our Acid theme also rejected, I just decided that nothing is going to stop me. I will work on the Acid theme until it is approved.

As it turns out. It’s all that was necessary. I could write a book where I could describe all the advice I’ve accumulated from all the literature I’ve read on the subject, but it all really boils down to the decision not to fail.

By that I mean – If you think you fail, you failed. If you decide not to fail at all, you won’t. Or as Thomas Edison puts it:

I haven’t failed. I’ve just discovered 10’000 ways that won’t work.

It’s a really simple lesson. At least it sounds simple. But there is no way you’ll learn it but through experience.

Snippet: Get the correct page in WordPress

Here is another really quick snippet. If you have a page where you’re using Query Posts you’re going to have trouble with Pagination. Wordpress for some reason likes to use page and paged randomly.

If you assign your page as the “front page”, you’re going to have to get_query_var(‘page’), and if you’re going to assign it elsewhere, it’s going to be paged. This is all fine and dandy, at least when you’re in control, but as soon as someone else starts using your theme, you need something more trustworthy, and that’s what this is. Continue reading

Simple Post View counter for WordPress

Right now I’m working on a redesign for TexturePlanet. Up until now I was using Detube theme on TexturePlanet, and it was really more like in an experiment stage to test if people are still looking for textures, and they are. Continue reading

New Everything

New Design

Thanks to WP-SBVTLE I’ve got a nice theme for myself. I will probably make a couple of edits now and then, but finally I feel like writing.

The default WordPress Twenty Twelve (or thirteen) aren’t bad themes, but I just wanted something more like… well – like this.

New Host

I’m still in the process of moving, but I’m finally moving from Rackspace to WPEngine. I’ll post about that later on, but so far my experience with WPEngine has been truly amazing! They are awesome!

New Header Image

Well. Previously I didn’t have one, so theoretically it’s not new, but I’ll count it as new. I took the Elephant from The Noun Project, designed by Ted Mitchner.

New Writing style

Yes. This was a short post. I hope to keep writing nice little short posts to get into the habit of writing.

How I built Progress App – Time Tracker

Identify the Problem

I’d like to think that I’m no different than most of the developers out there. We identify a problem that we encounter and automatically begin thinking of possible solutions.

My problem was a simple one, this time. I wanted to start a side-project ( if you must know – it failed half way through ), but this time, after reading a couple of articles about side-projects, I decided to pay attention to how much time I spend on my side-projects. And I’ve always wanted to know just how much time does something take up exactly. It’s easy to think “ohh it will take me just 3 days”, then spend almost 2 weeks on a project (like when building this application), and finally just loose track of your time completely ( for example now I have no idea how long did it actually take me to build the Progress App ), sure I can do some simple date-hour-calculation “I worked from A date to  B date about C hours a day, which means that I worked D hours”, but that is just not good enough, and it gets even worse when you have a very flexible schedule (like I’ve always had), because you manage your own work. I don’t want to repeat the “3 days to 2 weeks” mistake ever again! Without simple time tracking, I know that I will get lost again and again. This just had to stop!

Search for a Time Tracker

If I would build an application for each problem that I encounter, I would have a lot of problems and close to no solutions. Instead I use the search and gladly buy solutions. My initial search was on the Android Market, because I own a Samsung Galaxy S3 ( we’ll come to the “How did an Android app become an iPhone app?” question later ), and I was confused. Not a single application did that seemingly simple thing. Sure, there are time trackers for all sorts of things, egg timers, running-tracker buddies, freelancer time trackers (like harvest), etc. I didn’t need all that complexity. I wanted a couple of labeled chronometers. Was it too much to ask ? I guess so.

I must admit, that I might have ignored a couple of applications out there. But even if I have, it just means that I reached a certain level of frustration and decided not to bother anymore. Moreover, they probably didn’t fit to my “Simple application” criteria,  because really, I was going to give somebody a 1$ for a simple application, nobody wanted my $.

Define a Solution

After all the frustration, the defining the solution was easy. A simple application that lets me  time my projects/tasks. Emphasis on simple. And of course I should be able to delete tasks, edit the labels and reset their timers.

Right now I’m timing how long does it take me to write this article. I called the timer “Writing Article”. When I’m done with writing, I’ll just stop the timer and see how long did it take me to write all this. The next time I’ll write an article, I’ll reset the timer and see how long is that article going to take. And so on. This was the solution I was looking for.

Fixing The Problem

For the past year I’ve been building applications with Appcelerator Titanium, which has been a very… let’s say “dynamic” experience, but I’ll talk about that another time. For now – all you need to know is that Titanium promises a solution to build cross-platform applications, and because I’m no good in Objective-C (and because I have an Android phone) I decided to build my application in Titanium (with JavaScript). So I did.

Android Idea, iPhone App

What started out as an idea for the Application for my Android phone had just shifted into an iOS Application idea. How? It’s simple, really.

From my experience Android market is a poor place (in comparison with Apple App Store). Applications just don’t sell, users are dissatisfied a lot more, and paid applications aren’t popular. Even further (I know I said I wouldn’t talk about it here) Titanium is just no good for Android. All that combined, and I just didn’t see the value of investing another 25$ for a marketplace membership (which isn’t expensive at all, after Apple’s 99$). 

Even further. Android applications require a lot more work, not just because of Titanium, but because of Android. Android is a nice, open operating system, but it comes with it’s own set of problems. For example if you think responsive design is hard, try doing responsive apps, that have to account for all the different screen sizes and systems that the application should be run on. I have no idea how real android developers actually get by.

So I had an idea for Android App, I built it for iOS, and I’m using it alone (with 2 other peeps) on my Android, because after all, I wanted to track my time!

 

Conclusion

My girlfriend is a Designer/Illustrator, so I had it easy. I asked her to make a nice icon/splash screen and the UI Design. We gave the design a lot more thought than I initially anticipated, but in the end, I think we built a nice little application.

At this point, I’m not sure if I am ever going to publish the application on Google Play store, because of (again) Appcelerator Titanium, the application isn’t just as responsive as I’d like it to be (as in – you have to wait a few ms until a tap event is registered) . I believe that the application should provide value if it’s being sold, and I think that the slight lag (that I’m okay with, but I didn’t buy the application from someone else) defeats the feel of the application a bit. But releasing it for free on Android market wouldn’t just be fair to iOS users, so – Android, you lost yet another app.

It took 6 days for App Store to approve my application, so here it is:

Progress App Icon 

Progress App: https://itunes.apple.com/us/app/progress-app/id594906155?ls=1&mt=8

 

Sublime Susy

Sublime Susy 0.1

I just uploaded my initial commit to Github with snippets for the Compass Susy Grid system.
This is version 0.00001, which means I have no idea if I’ve made spelling errors or forgot something, but we’ll fix them over time, right ?

I hope that in the future we can add in some auto-completion for Susy variables, etc, but for now, I hope that you’re going to like my Susy Snippets

Var_dump sucked.

Why I didn’t use var_dump() for a long time, even though it has very valuable information in it ?  You most probably guessed it. It looks terrible. Even when you fix it with adding <pre> tags around it, it’s still ugly.

Consider this code:

Well it is turned into this:

Plain var_dump

It’s ugly! It’s so ugly! There are no other words for it.

So I could never talk myself into using it, and because of that for the past few years, I did a print_r(), wrapped in those “pre” tags.

Until I saw a screencast by Jeffrey Way on Laravel, and I saw the single most beautiful var_dump in the history of mankind.

Pretty var_dump

Look at it! It’s so pretty! It’s the same data, but so much has changed!

So I wanted it too. After some googling, I found out, that it is a PHP Extension (that anyone can install) and not a Chrome extension (which was my initial guess). It’s called Xdebug, and you can get it at http://www.xdebug.org and you’ll probably want to read more about the installation ( http://xdebug.org/docs/install )

In addition, I initially thought, that I’d have some difficulties installing and setting Xdebug up, since I’m a MAMP user (I like graphical interfaces and all that good stuff, I just can’t help it, that’s why I am so excited about Xdebug after all). Turns out, that I was wrong (again).

Enabling Xdebug on MAMP (Pro) is as simple as, well – enabling Xdebug on MAMP (Pro). All you really have to do is:

  • Open MAMP
  • File -> Edit Template -> PHP -> PHP (your-version).ini
  • Go to the very bottom and uncomment the Xdebug extension (remove the semicolon at the beginning of the line), like so:

  •  Restart MAMP

And That’s it! Enjoy!

 

CoffeeScript Blows. Minds.

Was looking for a simple way to write an alternative of PHP’s in_array() function in JavaScript, and since I’m using actually writing CoffeeScript, decided to look there as well. And sure enough. Mind Blown.

 

Turns into

 

 

 

Get Attachment ID from media_sideload_image()

Problem

In this scenario,

The $image variable now returns the full HTML, like this (with single quotes for some reason)

Which isn’t so bad, unless we want to get Just the image URL, or maybe the Thumbnail URL, or just the attachment ID.
Here is how to do it.
Continue reading

FireSass with FireBug for FireFox.

Finally Nex3 released an “official update” in FireFox Addons. I’m not sure, but as far as I know the functionality still remains the same, and nothing actually had to be updated, except “FireFox compitability version” setting. There were “hacks” around (get the github version, change a line, be happy).

Crazy browser Versions

The Add-on was “outdated” for a while, just because FireFox is spitting new “major” versions every day now. I guess that is some bad influence of Chrome. In my opinion the “higher number” doesn’t really matter in the browser version, and if someone were to argue that it does, then I’d say that FireFox is still 8 versions behind chrome at the moment (what an outdated browser, meh?). Version updates (like from Version 1 to Version 2, or 3) should be with some visible significance! It doesn’t apply to Chrome, as Chrome does it in the background anyway. It doesn’t ask you if you want chrome 18 or chrome 29 or chorme 441, it just updates, and doesn’t break your extensions!

Safari is now what, 5.4 ? I wouldn’t think for a second that Safari is an “outdated” browser (even though the version number is smaller than IE6).

Anyway. I think Mozilla got it wrong there, and I’m just ranting here, because it broke the plugin at the Extension Directory, and I was lazy enough to not to compile one for myself.

What is FireSass ?

By now, I’d expect you know what is SASS, and you probably have guessed I like SASS.

Well, in short – FireSass does this:

See on the right ? It says “_type.scss (line 40)“.

Well that is because of the FireSass plugin. I can now see where the selectors “actually” came from, so this really helps when debugging with SASS. It doesn’t even mention that the only CSS file I’m using is called “style.css”, because CSS at this point is useless (for development) as I use SCSS exclusively. When looking something up, I’m interested in where did something come from in SCSS, and FireSass helps a ton with that!

Great, how do I get FireSass ?

Easy as pie.

First, you download & install the addon (you have to have FireBug first of course)
Then you go to your project you want to use FireSass with and set it to “emit debug info“.

If you’re using an app to do that, great – use that. If not, then you can look in the FireSass github page what steps you should take.

Don’t worry. It’s supersimple.

Basically what the GitHub pae says is that if you’re using SASS from Terminal, you add “–debug-info” to the watch statement.
If you’re using Compass and SASS, find the config.rb file, and add: