Posted on Leave a comment

Tech Talk #1 – Welcome To Tech Talk

[youtube width=”100%” height=”100%” autoplay=”false”]https://www.youtube.com/watch?v=6cVkXCEyAoI[/youtube]

Welcome To My First Tech Talk

Every Tuesday and Thursday I do #TechTalk a live stream show where I speak generally about technology. In the first episode I give a brief introduction into Tech Talk, my trip to Amsterdam, Euro tech scene vs. USA tech scene and more! Please like and subscribe to my channel to get real time notifications when I go live. If you have any questions that you would like to ask me, but you missed the live stream, follow me on Twitter @mastashake08 and tweet to me using the hashtag #TechTalkTuesday or #TechTalkThursday. I will get to them on the next show! Lastly subscribe to this blog to get updates whenever I post!

Posted on 1 Comment

Jyrone Parker Live – Intro Into HTML5

[youtube width=”100%” height=”100%” autoplay=”false”]https://www.youtube.com/watch?v=OGzV3D10LjE[/youtube]

What Is HTML5?

HTML5 is the newest standard of HTML (Hypertext Markup Language) which is the language used to define webpages. All webpages, including the one you are using to read this article is made up of HTML. HTML documents are text files that end with an extension .htm or .html HTML documents are made up of opening and closing tags that usually follow the convention

<tag>
Stuff between tag
</tag>

I say usually because as you will see in the above video some tags don’t require a closing tag. HTML can also be used in conjunction with CSS and Javascript to create stunning mobile apps using hybrid development. In this video I explain what HTML is, how to create a simple webpage and good resources to follow through with. If you haven’t already subscribe to my Youtube channel to get real time updates on when I go live!

Posted on Leave a comment

Jyrone Parker Live – Buidling Our First PHP Application (Fibonacci)

[youtube width=”100%” height=”100%” autoplay=”false”]https://www.youtube.com/watch?v=-77pgzODEQI[/youtube]

What Better Assignment Than Fibonacci?

Since I am finished with the beginning into to PHP videos I found it imperative to do a stream putting everything together and showing you how easy it is to write an app. In today’s live stream I create a Fibonacci app, for those who are not familiar with the Fibonacci sequence there is a great wiki here. In this application I demonstrate variables, control flow logic, exception handling, and function design. All my code can be seen on my Github here or you can view it below in text or on video

<?php
$input = '';
$running = true;
while($running){
try{
getInput($input);
echo calculateFib($input) . "\n";
}
catch(Exception $e){
echo "Message: {$e->getMessage()}";
}
}
function getInput(&$input){
$input = readline("Please input your number or q to quit: ");
};
function calculateFib($input){
if(intval($input) < 0){
throw new Exception("Input must be greater than zero! \n");
}
elseif($input === 'q' || $input === 'Q'){
exit();
}
if(intval($input) === 0 || intval($input) === 1){
return 1;
}
else{
return calculateFib($input-1) + calculateFib($input - 2);
}
};
?>

 

Posted on Leave a comment

Jyrone Parker Live – Exceptions/Error Handling

[callaction url=”https://www.youtube.com/user/JPlaya01″ background_color=”#333333″ text_color=”#ffffff” button_text=”Go Now” button_background_color=”#e64429″]Subscribe To My Youtube Page[/callaction]
 

Exceptions and Error Handling

Continuing in the PHP tutorials I am showing you how to throw exceptions and handle errors in PHP. Often times when you are building software you have to account for when things go wrong. To ensure the best experience for your user, you want the application to gracefully handle those errors instead of crashing and leaving the user quizzically stumped. This is where exceptions come in. If you account for the cases where things might break and throw an exception then you can use the try/catch  control structure to catch said exceptions and handle them accordingly. A quick example is such:


<?php
function getRandomRange($min,$max){
if($min < 0){
throw new Exception("Min must be greater than 0");
}
if($max > 10000){
throw new Exception("Max must be less than 10000");
}
return rand($min,$max);
}
try{
/*
php exceptions.php $mix $max
*/
echo getRandomRange($argv[1],$argv[2]) . "\n";
}
catch(Exception $e){
echo $e->getMessage()."\n";
}
?>

Exceptions are part of the global PHP namespace and you can even create your own version on an exception that extends from the Exception class. If you didn’t get a chance to watch my live stream on the subject I talk about it more in depth, you can find it below
[youtube width=”100%” height=”100%” autoplay=”false”]https://www.youtube.com/embed/IkWK3qZ5Ix4[/youtube]