Monday, March 30, 2015

Rediscover YouTube!

YouTube is great but it's huge.  Rediscover it with Crombz.com to find great vloggers, musicians or gamers.


Crombz is a new community for Youtubers where they can get visibility as only videos with less than 500 views are accepted.  Discover new talents, hidden by the already viral channels.


Sunday, March 29, 2015

Webapp for iOS: How to avoid links opening in Safari

If you're a web developer, you may have found out that any website can be added to the home screen of any iOS devices.

It's a feature that is builtin iOS and with the proper meta-tags in your HTML code, you can create a webapp for iPhones and iPads quite easily.

The main issue is when your webpage has links.  The default behaviour in iOS is to open Safari to view the link, meaning that your webapp will open in Safari as soon as the user clicks a link in your webpage.  This is annoying as you may want the link to open inside the webapp and not in Safari.

Do not despair, there is a simply trick that you can use with Javascript to avoid this issue.  Nothing fancy and nothing complicated.  Just a simple line of Javascript will solve this problem...

Here's a common link in a webpage:

<a href="viewer.php">View this link</a>
The problem is that as the user will click this link on his iPhone, Safari will popup to display the content of the link instead displaying the "viewer.php" from inside the webapp.  Instead, create your links as such:
<div onclick="document.location='viewer.php';">View this link</div>
This will load the new webpage and stay inside the webapp instead of opening in Safari.  As a bonus, the "onclick" event is available on almost all elements, meaning that you can transform any element into a clickable link.

The, you just have to use CSS to set the proper look on the element to it looks like it is a link and behaves like a link...

Have fun!


Sunday, March 15, 2015

Looking for Youtubers!

One of the greatest place to publish videos is YouTube. You work hard at creating quality content, upload your videos files and then hope for the best.

Actually, you will then share over the social networks about your channel, subscribe to other channels in the hope that someone else will also subscribe to your content. If your starting your channel, there is a good chance that it will take time before getting more than a 100 views on your latest video.


Even if your videos are of great quality and that you promote your show everywhere, you are fighting against the masters of YouTube. Thousands of Youtubers are uploading videos each day. Only a few will be noticed as everybody is hunting for the most popular channels.

That's why I've created Crombz.com. I wanted to create a community of Youtubers and vloggers, dedicated at promoting new channels and less known Youtubers. The mission of the community is to find out the best and give them exposure.

Don't worry, it's free! There is no scam or points to earn. You just need to submit your video (YouTube link) and that's it. To avoid spamming, a few filters have been put in place:

- Video duration must be at least 2 minutes
- View count must be less than 500 when submitting
- Videos are filtered to avoid porn, illegal stuff or copyrighted material
- When submitting, you need to wait 60 seconds to avoid spamming

Crombz is new but already getting many fans after 3 weeks. I am trying to build a community where you can discover the undiscovered.

Randomly, submitted videos are shared over Twitter, Facebook and Google+. Sharing buttons for major social networks are available for each videos to help promote the selected content.

More features will be added as the community will grow. Already, a Trending page has been setup to find out which submitted videos have gain the most views in their first 24 hours (from everywhere, not only from Crombz).

Help is needed to build a great community:

- Dedicated Youtubers that want to create great content
- More visibility is needed for Crombz.com. Please share with your friends.
- Donation are accepted for promotion with Adwords
- Ideas are welcome to improve Crombz. Keep in mind that this is a community, not a spamming site.

As Crombz.com will grow with dedicated Youtubers, automatic feed will be reduced to leave room to the community.

In the first week, Crombz was having around 10-30 visitors a day. On the second week, the number of visitors was around 150-200 and climbing. As writing this post, that number has grown over a 1000 daily.

Yesterday, March 14th 2015, was spectacular as we had reached 2500 visitors at then end of the day. Things got slower today with only 1000 visitors but still happy about the result.

Crombz is getting more traffic each day but needs dedicated Youtubers. Help me out finding them, talk about Crombz, blog about it, tweet about it...

Thanks for your support, I really appreciate.

Patrick Balleux

PHP: Lower the Entry Process for your website

If you have a website that is using PHP on the server side, you may be struggling with the Entry Process reaching the top limit of your web host.

What is an Entry Process?  Basically, it means that a process is launched on your web server host each time a page is requested.  If you have a lot of traffic, this means that at some point, you may reach the Entry Process Limits imposed by your web host and your visitor will get a message that too many resources are being used.

This is really annoying but there is not much that you can do about it if you are hosting static html page.  On the other hand, this issue can be triggered by your dynamic web pages and can be improved by tweaking the rendered code to be faster.


If you are using PHP, as a lot of web developers are doing, you may have a webpage that does look like this:
<?php $title = "Crombz.com - The best website!";?>
<html>
<head>
<title><?php echo $title; ?></title>
</head>
<body>
   Hello, this is my webpage and the title is <?php echo $title; ?>
</body>
</html>
This is a regular case where you will embed in the HTML code some part of PHP code.  It does work nicely but has a major drawback:  The page will be rendered a bit slower than a pure HTML page.

Since a PHP webpage takes a bit more time to be served by your host, you do increase the chance of  reaching the Entry Process Limits if you have a lot of traffic.  Assuming that you are limited to 10 Entry Processes at the same time, if the time to render your PHP page takes 0.2 seconds, you will have a maximum of 5 visitors being able to view your page at the same time.

I have struggled this week with this issue on my website Crombz.com.   After reviewing the code, I realized that PHP had to parse a mix of HTML and PHP to be able to render the page properly.  After some experimenting and tweaking, I modified my code like this:

<?php
    $title = "Crombz.com - The best website!";
?>

<html>
<head>

<?php
    echo '<title>'.$title.'</title>';
?>

</head>
<body>

<?php
   echo 'Hello, this is my webpage and the title is .$title;
?>

</body>
</html>
I made sure that a single line was either a pure HTML code or a pure PHP code...  It has lowered the rendering time so much that even with 30 visitors, I am not reaching the Entry Process Limit of my web host.

Of course, your code will be a bit more complex but the benefits are that you will lower the chance of reaching the Entry Process Limits even with a high traffic.

I haven't tested rendering a webpage in pure PHP, but it would probably be faster than having mixed lines of HTML and PHP.

Happy coding!



Thursday, March 12, 2015

Google Code is shutting down!

Today I received this email from Google. It's a sad one as Google Code will shutdown it's service in the next year.



This means I will have to move my projects to another host. Sadly, all links posted on the web will have to be redirected. I'm thinking at WebcamStudio mainly where everything was built around Google code for packaging the Debian app.

Too bad Google Code is disappearing, it was a great platform.

Patrick Balleux

Sunday, March 8, 2015

Share your website over Twitter with Cards

When sharing a link over Twitter, you may see that a summary is sometime available giving a preview of the website to the viewers.

Did you know that you can have the same result with your website? Twitter has made available metatags that you can integrate into the header of your webpage so the summary will be visible.


Ref: https://dev.twitter.com/cards/overview

Once your tags are in place, you need to validate your website with Twitter:
https://cards-dev.twitter.com/validator

I did set the tags on Crombz.com and you can see the results when Crombz.com is shared.



And if you can use some PHP, you can even create dynamic content like this:



This will make you website look better in social networks, at least on Twitter. Facebook and Google do also use some kind of metatags to achieve the same results.

Making your website ready for social networks is a must. After only a few days, I can already see Crombz.com getting more visitors and being shared over Twitter more than before.


Patrick Balleux