Nikola Brežnjak blog - Tackling software development with a dose of humor
  • Home
  • Daily Thoughts
  • Ionic
  • Stack Overflow
  • Books
  • About me
Home
Daily Thoughts
Ionic
Stack Overflow
Books
About me
  • Home
  • Daily Thoughts
  • Ionic
  • Stack Overflow
  • Books
  • About me
Nikola Brežnjak blog - Tackling software development with a dose of humor
Books

Big Magic – Elizabeth Gilbert

My notes from the book Big Magic: Creative Living Beyond Fear by Elizabeth Gilbert, the author of a bestseller book Eat, pray, love.

Rejection, you think you can scare me off? I have another 80 years to wear you down! There are people who haven’t even been born yet who are going to reject me someday. That’s how long I plan to stick around.

I believe that enjoying your work with all your heart is the only truly subversive position left to take as a creative person.

It ain’t what they call you, it’s what you answer to.

Everybody imitates before they can innovate.

Holding yourself together through all the places of creation, especially the hard times, is where the real work lies.

What’s your favorite flavor of shit sandwich?

A good plan violently executed now is better than a perfect plan executed next week.

You may want your work to be perfect, I just want mine to be finished.

Focus on your devotion to work above all. Let that be the measure of what you’re worth.

It’s not what you know, its who you know. Talent means nothing and connections mean everything in the world is a mean and unfair place. If you want to see it like that, go right ahead.

If my Devils are to leave me, I’m afraid my Angels will take flight as well.

What could you do even if you knew you might as well fail? What do you love doing so much that the words failure and success become relevant?

Only when we are at our most playful can divinity finally get serious with us.

https://twitter.com/HitmanHR/status/678576822632755200

Stack Overflow

I reached 5k rep on StackOverflow and this is how it helped me

Yippee, my milestone has finally been reached; I went over the magical 5000 reputation on StackOverflow.

so5k

This currently places me in the top 4% this year, and in the top 2% in my country.

notBad

At the beginning, I was asking way more questions than giving answers, but that leveled out and recently I surpassed the number of questions (138) with the number of answers (147).

My current top 5+1 questions by number of upvotes:

(61) What is disableSelection used for in jQuery sortable?
(39) How to replace text between quotes in vi
(18) Serialize form not working in jQuery
(15) Add three dots in a multiline span
(14) PHP function to evaluate string like “2-1” as arithmetic 2-1=1
(12) jQuery Themeroller Gallery for Mobile

My current top 5+1 answers by number of upvotes:

(19) jQuery: select an element’s class and id at the same time?
(18) How to open a link new tab with print command?
(13) Linking using relative path on Github README.md
(7) Google MAP API Uncaught TypeError: Cannot read property ‘offsetWidth’ of null
(6) jQueryMobile data-dismissible in version 1.2
(6) What’s the difference between “ionic build” and “ionic prepare”?

For these questions I got the golden Famous Question badge (question with 10,000+ views):

  • Wait for images to load and then execute all other code
  • jQuery datatables plugin too slow – need a replacement
  • jQuery Mobile changePage with swipe transition
  • PHP function to evaluate string like “2-1” as arithmetic 2-1=1
  • Add three dots in a multiline span
  • Serialize form not working in jQuery
  • What is disableSelection used for in jQuery sortable?
  • How to turn off php safe mode in plesk 10? [closed]

The tags I’m most active in are ionic, ionic-framework, jquery, php, html, javascript, cordova, and 211 more.

In the question on meta.StackOverflow about how did StackOverlow help me, my answer was:

StackOverflow helped me a lot. Let me elaborate on this: currently, according to my upvotes, it helped me exactly 3,630 times a lot. Imagine that, learning 2.5 new useful things on average each day for four years now. And all that for free. Pro bono. Only upvote and (optionally) a kind word required.Priceless!

Also, more specifically, it helped me 133 times when I asked my own question (surprisingly, only 4 of them remained unanswered so far).

My experience with StackOverflow was very positive from the start (something I’ll elaborate a bit more below) – it was my first few weeks on a “test period” for a new job and I couldn’t solve one thing. They said it would be tricky and I sort of hoped that if I get it done quickly I’ll get some recognition. I did my fair share of googling and looking around the site (I knew about SO at that time already, but just haven’t asked any questions yet) and since I didn’t find any related question I finally decided to post. Not surprisingly, I got the answer in a matter of minutes. Sure enough, I did get permanently employed after that (and few other small tasks that I had to do on top of that).

See, I would like to emphasize on a way that I asked my first question, by repeating that I’ve googled quite a lot and searched through existing SO questions. Now, we who are around here a bit longer know what started to happen. New users started to come and, well, the quality of questions was not on a given level. And, that’s why it hurts me to see quite a lot of people shitting on StackOverflow (yeah, we know who they are – simple google search will turn out quite a few posts), but if we would just be honest and acknowledge the fact that it somehow seems that these days everyone wants something “out of the box – give me the codez plz”, without ever doing the research them self. What’s the learning value in that, I honestly don’t know.

Anyways, fast forward 4 years, I’m still loving it. Somewhere along the lines of using StackOverflow daily, I’ve grown as a developer and turned from the one who asks questions to someone who tends to contribute back to this wonderful community by giving answers. And, just yesterday I’ve “set the record straight” and leveled the number of my questions with the number of my answers. In the future I hope to help even more.

As for other opportunities StackOverflow provided me, I can only say countless. I don’t have a huge rep, but nevertheless I’ve gotten into an invite only programming site thanks to my SO profile. Also, I’ve gotten few requests to write a book, be a technical reviewer, and I get a lot of clicks from SO tomy blog. It seems a bit cocky to say, but people do tend to look at you differently when you say you have a somewhat fairly large amount of rep on SO. For me, it’s some kind of a badge of honor, to be honest 🙂

All in all – thank you StackOverflow.

See you at 20k! smileyGlasses

I reached 5k rep on #StackOverflow and this is how it #helped me https://t.co/A7xnWVOzkq pic.twitter.com/ZqiDFCyy7z

— Nikola Brežnjak (@HitmanHR) December 16, 2015

Ionic, Pluralsight

How to publish the app to the Apple’s App Store and Google’s Play Store

edit: These posts don’t exists in their separate form anymore. Instead, they have been merged into one big post that you can read here. But, in case you want to read them in its original form, make sure to check the book linked below.


The fourth post about Ionic framework for Pluralsight wraps the series in a whole where we showed how to create an application starting with an idea, through creating a prototype and implementing the application using Ionic framework to finally (in this tutorial) publishing it in the stores.

You can see the finished product on the header image and you can check out the application by downloading it from the App Store or Play Store here.

The post is live and you can access it for free here:  How to publish our calculator application to the Apple’s App Store and Google’s Play Store.

This was a series of posts which was intended to teach you how to take advantage of your web development knowledge in building hybrid applications for iOS and Android.

The first tutorial, as you may remember, was all about how to get started with Ionic framework on Mac andWindows. The second tutorial was about how to create a calculator application with Ionic framework by using Ionic Creator for UI. The third tutorial was about how to polish, create icons and splash screen images, add ads, share and test our calculator application.

IonicBook

If by some chance you would like to download a PDF version of these 4 posts you can do so via Leanpub. Yes, you can choose zero as the amount and I promise I won’t take it against you 😉

If you have any questions please don’t hesitate to ask, and please share if you like it.

How to #publish the #app to the Apple's App Store and Google's Play Store https://t.co/DkFBeTj8yi @ionicframework pic.twitter.com/SjROTSn5OO

— Nikola Brežnjak (@HitmanHR) December 15, 2015

Stack Overflow

Include an object defined outside Angular ecosystem into a factory

profile for Nikola at Stack Overflow, Q&A for professional and enthusiast programmers
I’m a big fan of Stack Overflow and I tend to contribute regularly (am currently in the top 0.X%). In this category (stackoverflow) of posts, I will be posting my top rated questions and answers. This, btw, is allowed as explained in the meta thread here.

I asked this question myself:

We’re having an argument, which I hope you guys will help resolve.

Say I have a simple factory defined like this:

angular.module('myModule', [])

.factory('Fact', function() {
    var Fact = function() {
        var that = {};

        that.var1 = [];
        that.var2 = [];

        return that;
    };

    var fact = {
        get: function() {
            return Fact();
        }
    };

    return fact;
});

I found out that this code will be working if I write it like this:

angular.module('myModule', [])

.factory('Fact', function() {
    var fact = {
        get: function() {
            return Fact();
        }
    };

    return fact;
});


var Fact = function() {
    var that = {};

    that.var1 = [];
    that.var2 = [];

    return that;
};

Namely, I can take this code of the object Fact and put it in some other plain .js file, include it before the Angular one (in index.html file) and this “would work”.

However, I’m trying to resolve an argument that this approach is not good (well, not an Angular approach at that) because then this Fact is “laying around on the global scope”, which is not good.

In which circumstances would you say that this is/isn’t a good solution?

Is there a way to include a “nonAngular” code (simple JavaScript code written in some .js file) into the Angular factory?

I accepted the answer from user Dan Prince:

Between factories, services, providers, constants and values, there’s not really a good reason to have any code outside of Angular’s constructs unless it’s third party code.

If it is, you won’t have control over the way that the library, framework, etc registers itself. It might use the global scope, alternatively, it might provide a module export.

Where possible, the cleanest and safest way to include third party code inside Angular is with a build-step using a module bundler.

For instance, I want to use the hypothetical package foojs from inside Angular using browserify:

Install the package with npm

npm install --save foojs

Then use it like this.

var foojs = require('foojs');

var app = angular.app('myapp')

app.service('myservice', function() {
  // here we can use foojs safely
});

You can also achieve similar things with WebPack.

The reason this is safer is because after the build step, all the modules will be wrapped inside a function that protects the global scope.

If you aren’t able to use a module bundler, then the only option is to use the global scope and allow the third party code to bind onto the window object.

https://twitter.com/HitmanHR/status/676654486115454976

Books

Four Thousand Days – Duane Jackson

I got this awesome book from an, even more, awesome author Duane Jackson, after a discussion on Twitter where we realized that Amazon.co.uk decided that Croatia was not on the list of countries that would be eligible for the free ebook (even though the author marked the book as free). In the end, the author said that I should contact him and that he’ll send me a physical copy to my address.

The book arrived:

IMG_5513

And I was just joking with my friends after I told them about it: “How awesome would it be if the book would be signed?!”. Aaaaaand, what do you know:

IMG_5514

In my book, Duane Johnson is da man! So, thanks again, you really made my day!

Btw, I really liked the book, had a few laughs and learned some valuable things. I wonder if some of my blog readers use his KashFlow (the service that he built and talks about how in the book)?

In the book, the author writes about how he managed to build the business after doing the time. He summarizes it really well at the end of the book:

I hope that by reading this book you’ve found out the secret of how to do this. The secret is that there is not secret. There was no overnight success or magic button to press. It was a case of being determined, working hard and not allowing yourself to be at the mery of fate of other peoples will.

Other quotes (and funny situations) that I liked from this book:

If you don’t design your own life plan, chances are you’ll fall into someone else’s plan. And guess what they have planned for you? Not much. ~ Jim Rohn

I’ve never been great at getting up in the morning, but staying up till 3am certainly didn’t make it any easier.

We’re in the infamous Blind Beggar in London’s Whitechapel, where Ronnie Kray shot dead George Cornell. (Legend; great movie starring Tom Hardy as Kray twins)

Everyone knew I never took drugs, so they quite literally took the piss out of me. My urine became incredibly valuable on testing days.

You can’ hit Jacko said Dodger, That’s like hitting a part of the furniture.

Ben picked me up in his BMW convertible. It was a summer day and the roof was down. I shouted at him to slow down, as I thought he was doing 100 mph but in fact, he was only going at 25. For the last 18 months nothing had gone faster than a quick walk.

I learned the valuable lesson of never doing work without getting paid something up front.

Actually getting started in business wasn’t as difficult as I thought. It really was as easy as finding people who needed what you could offer and agreeing on price.

I’m sorry, Duane he said in ear shot of the others. We won’t be able to have our daily management meeting tonight.

Enerpreneurship is living a few years of your life like most people won’t, so that you can spend the rest of your life like most people can’t.

Duane, it’s your mate will.

The future of boxed software

Breaking News, Ionic

Ionic 1.2 is out!

The team from Ionic announced their new 1.2 version today. This should get you very excited because the things these guys are making are truly praiseworthy.

As they say in the report:

  • it has over 100 bug fixes
  • uses native scrolling by default on all platforms (which means better responsiveness on Android especially)
  • new Slide box component (use the new <ion-slides> tag)
  • support for Windows 10 and Edge, which runs on the new Windows Phone 10 platform
  • if you want to build a mobile website, you’re fully and officially encouraged to do so (not just an app for the app store). As many of you know, this was not the case so far.
  • new <ion-input> tag
  • dropping support for the raw HTML and CSS versions of Radio and Checkbox, instead you’ll have to use directives <ion-radio> and <ion-checkbox>
  • better integration with Cordova plugins in terms of better console log error output
  • Ionic Native
  • …

You can read the full report on their blog post: http://blog.ionic.io/announcing-ionic-1-2/.

@ionicframework Awesome Ionic 1.2 is out! Mobile website mode supported! https://t.co/QsdhghpPdP pic.twitter.com/pvFpZVARvg

— Nikola Brežnjak (@HitmanHR) December 10, 2015

Ionic, Pluralsight

How to polish, create icons and splash screen images, add ads, share and test our calculator application

In my third tutorial about Ionic framework for Pluralsight, I’m going to show you how to:

  • polish,
  • create icons and splash screen images,
  • add ads,
  • share and test our calculator application

The post is live and you can access it for free here:  How to polish, create icons and splash screen images, add ads, share and test our calculator application.

Btw, if you’re wondering where is the main image from, it’s actually from a landing page of the published apps (we’ll show you how to do that for both Play Store and App Store in the next tutorial), and you can take a look at it here: SuperSimple Calculator.

This will be a series of posts which will teach you how to take advantage of your web development knowledge in building hybrid applications for iOS and Android.

The first tutorial, as you may remember, was all about how to get started with Ionic framework on Mac andWindows. The second tutorial was about how to create a calculator application with Ionic framework by using Ionic Creator for UI.

If you have any questions please don’t hesitate to ask, and please share if you like it.

How to polish, create #icons and #splash screen images, add #ads, share and test our #ionic #calculator application https://t.co/52k5f1G9CH

— Nikola Brežnjak (@HitmanHR) December 9, 2015

Ionic, Stack Overflow

How to deploy Ionic as a website?

profile for Nikola at Stack Overflow, Q&A for professional and enthusiast programmers
I’m a big fan of Stack Overflow and I tend to contribute regularly (am currently in the top 0.X%). In this category (stackoverflow) of posts, I will be posting my top rated questions and answers. This, btw, is allowed as explained in the meta thread here.

As you may know, I’m really into Ionic framework lately and am helping out on StackOverflow with the knowledge I gained so far with the framework. I’m in the top All time answerers list.

edit: As of version 1.2 Ionic is officially saying that you are free to deploy Ionic as a website.

I answered this question by user Ayush Chordia:

I have created an ionic app and want to deploy it as a website. What’s the best way to deploy it on a custom domain ? I was thinking of using azure web app to host the ionic app. All the documentation refers to use it as hybrid app for IOS and Android. But at this point we are only interested for it to function as a website.

In my answer I disagreed with this one:

As I stated in the comment to the only provided answer – I disagree.

If you’re not using any Cordova plugins then there is no problem (if you really wish to) to upload the contents of the www folder to your server, and woila – you’ll have the same app.

However, it is important to note that Ionic never intended for such a use, and the users of your “website” will have to have a newest browser in order to see the “website” correctly (not broken down due to some feature that Ionic is using in either CSS or HTML that some older browsers do not support).

You can see such example here: http://nikola-dev.com/IonicCalculator/mobile.html, and you can take a look at the tutorial with step by step on how to recreate the application. I literally took out the contents of the www folder and put it on the web server, and as you can see it works.

https://twitter.com/HitmanHR/status/674121400911863808

Books

UR – Stephen King

My notes from the book UR by the master Stephen King, which I marked as favorite and rated  5/5 on my Shelfari account.

Why don’t you just read from the computer, like the rest of us!?

Living well isn’t the best revenge; loving well is.

Can you keep a secret? Say no and I’ll have to kill you.

https://twitter.com/HitmanHR/status/673728553876389888

Ionic, Pluralsight

How to create a calculator application with Ionic framework by using Ionic Creator for UI

edit: the old link is not working anymore and all four posts have now been merged into one huge post: Ionic Framework: A definitive 10,000 word guide.

In my second tutorial about Ionic framework for Pluralsight, I’m going to show you how to create a calculator application with Ionic framework by using Ionic Creator for UI.

The post is live and you can access it for free here: How to create a calculator application with Ionic framework by using Ionic Creator for UI.

The first tutorial, as you may remember, was all about how to get started with Ionic framework on Mac andWindows. This will be a series of posts which will teach you how to take advantage of your web development knowledge in building hybrid applications for iOS and Android.

If you have any questions please don’t hesitate to ask, and please share if you like it.

How to create a #calculator application with #Ionic #framework by using Ionic #Creator for UI https://t.co/A7wCaKOunX

— Nikola Brežnjak (@HitmanHR) December 1, 2015

Page 27 of 51« First...1020«26272829»304050...Last »

Recent posts

  • When espanso Breaks on Long Replacement Strings (and How to Fix It)
  • 2024 Top Author on dev.to
  • Hara hachi bun me
  • Discipline is also a talent
  • Play for the fun of it

Categories

  • Android (3)
  • Books (114)
    • Programming (22)
  • CodeProject (36)
  • Daily Thoughts (78)
  • Go (3)
  • iOS (5)
  • JavaScript (128)
    • Angular (4)
    • Angular 2 (3)
    • Ionic (61)
    • Ionic2 (2)
    • Ionic3 (8)
    • MEAN (3)
    • NodeJS (27)
    • Phaser (1)
    • React (1)
    • Three.js (1)
    • Vue.js (3)
  • Leadership (1)
  • Meetups (8)
  • Miscellaneou$ (78)
    • Breaking News (8)
    • CodeSchool (2)
    • Hacker Games (3)
    • Pluralsight (7)
    • Projects (2)
    • Sublime Text (2)
  • PHP (6)
  • Quick tips (41)
  • Servers (8)
    • Heroku (1)
    • Linux (3)
  • Stack Overflow (81)
  • Unity3D (9)
  • Windows (8)
    • C# (2)
    • WPF (3)
  • Wordpress (2)

"There's no short-term solution for a long-term result." ~ Greg Plitt

"Everything around you that you call life was made up by people that were no smarter than you." ~ S. Jobs

"Hard work beats talent when talent doesn't work hard." ~ Tim Notke

© since 2016 - Nikola Brežnjak