Stage set for cyber war

sanjib-sinha-tehelka

sanjib-sinha-tehelka


Originally Published in Tehelka on 010817

You can download the PDF for offline reading…

Forget the past. The future of war suddenly presents itself with great razzmatazz. Two consecutive ransomware attacks — ‘WannaCry’ and ‘GoldenEye’ — shook the world with such ferocious force that it was evident — they were intended to attract only attention. The noisy and noticeable activity was not meant for stealing money only but to shout out a certain kind of presence in the cyber sphere. After that with every new computer installation the hardware people are now coming up with a warning — please don’t use pirated or back dated Windows operating system. Forget and forgive their naivety. The hacker’s target is no longer the singular person.

A new war front has opened up. Nation states have been become the target now. Not persons. In the recent past generally, the hardware people happily install old Windows operating system without any caveat — of course. What happened to them? Why are they so scared? The recent consecutive ransomware attacks that affected thousands of individuals and organizations worldwide suddenly changed the whole postulated sequences of possible events and our mindset.

Continue reading “Stage set for cyber war”

An introduction to new php 7 book

php 7

php 7


I had started writing a well documented book on PHP 7 in the month of March but I’d to leave the project unfinished as situation demanded.
I’m eager to go back to my unfinished job. Before that I thought it would be good for my readers to give them a glimpse of how I had started it.

Note from Author

I always love to write for the beginners. I love the innocent moments of bringing few new things to my dearest readers. And this time I’ve done it by taking a completely different approach. You build web applications and learn php 7 simultaneously.
Continue reading “An introduction to new php 7 book”

how to become a good wordpress developer

It’s not at all difficult to become a good wordpress developer.

Wordpress developer

WordPress developer


People often make a bad mistake. They think WordPress is only a simple, user friendly blog-engine. They use WordPress as a blogger not as a web programmer. There must be some misunderstanding or a set of thinking-patterns that is actually a wrong action attributable to bad judgment. If you want to become a good wordpress developer, you mustn’t make this mistake.
Continue reading “how to become a good wordpress developer”

How to become a good PHP developer

I want to answer this question from a beginner’s perspective. You’re reading this article because you’re a PHP developer with little knowledge and you want to make ‘coding as your forte’.

php developer

php developer

Closed or Open?

I’ve seen two sides of server side scripting. I had started learning PHP and MySQL much before I tried coding in C# and ASP.NET. I had not been developing with ASP.NET for long because I’d to leave it. Was it destiny? Actually I didn’t like the closed source. That was the real reason. Besides it was not my profession. I was not a professional PHP developer at the beginning. I was a data-journalist who wanted to be an Author and Ethical Hacker.
Continue reading “How to become a good PHP developer”

Beginning Laravel: A beginner’s guide to application development with Laravel 5.3

Learn Laravel quickly and efficiently. Add more power to your PHP skill. This book will guide you to learn one of the most popular PHP framework.
begiining-laravelBeginning Laravel

With Real World Code Example

Learn about dependency injection, interfaces, service providers, SOLID design, and more with practical and real-world code examples.
Continue reading “Beginning Laravel: A beginner’s guide to application development with Laravel 5.3”

Source of Inspiration

Good Writings: Source of Inspiration

Good writings always inspire us. It remains a good source of inspiration. How does it remain a source of inspiration? I cannot explain the internal mechanism but it works just like songs or paintings or anything good in this life. Good writings, interesting articles or books are not something that you find always. It’s a kind of good discovery!
Continue reading “Source of Inspiration”

Good technology and bad addiction

Technology is not bad. bad is the situation when we get addicted to it. Here, in this article I just wanted to touch the tip of the iceberg. You probably know the amount of danger is how humongous.

Good technology may grow addiction too

Can technology be really bad? May be some technology has some bad effect. Here is an example.
train, flight, taxi and a cycle//embedr.flickr.com/assets/client-code.js
I took this photo of the old man on the roadside at Puri. He was busy checking his smart-phone stopping his bicycle. May be it was an emergency but this is not a good habit to check your mobile on a busy roadside.

There are risks, and you know it!

No doubt in it. While checking smart-phone on the road-side you may invite trouble. For that reason only can we conclude, smart-phone technology is bad? No, certainly not.

Then What do you want to say?

I’m trying to say about the bad side effect of technology. And in that sense, some risks we can easily avoid. We need not install unnecessary software in our PC and phones.
Reading this will make views much clearer.
Technology Addiction
Any addiction is bad. Technology makes it, sometimes, worse.
So give it a second thought. The following link is so pathetic.
Chinese teen dies at Internet addiction rehab camp

Read The snippets

China is investigating the death of a teenager who was allegedly beaten to death in a camp designed to treat Internet addiction, state media said.

Deng Senshan, 15, died Sunday, less than a day after his parents sent him to the camp in southern Guangxi province, Xinhua News Agency reported.

This is truly alarming

Half of all teens are feeling addicted to their mobile devices, and 28 percent of them say their parents are addicted too. This is really scary. Where we are heading towards?
Half Of Teens Say They Feel Addicted To Their Devices
If this trend persists, the time has come to think over it. We need to bring this topic on the public forum as much as possible and start campaigning about it in the grass root level.

Digital switch off

make it mandatory that we should switch off our mobiles, tabs and PCs for a certain period of time. Let’s make it mandatory for our mental and physical health. Interaction with human beings is extremely important. We should consider to enhance that also.

Interaction between PHP and WordPress

Does WordPress really have interaction with PHP?

WordPress is a content management system that very heavily depends on PHP programming language. They interact with each other in every step. If you want to follow this interaction between wordpress and PHP, then you must have a little bit working knowledge of PHP. To understand this interaction between them, you need to understand few PHP concepts first. Specially conditionals and loops, functions, array and finally classes and objects.

Few words for PHP and WordPress developers

Do you want to become a successful PHP and wordpress developer – all together? if that so, then this series of tutorials are for you. The first thing you need to understand is the relation and interaction between PHP and WordPress. How PHP and WordPress interact with each other? What is the relation? What PHP topics you should learn?
You may consult my PHP Articlesto get an idea.
Interaction between php and wordpress//embedr.flickr.com/assets/client-code.js

Should I be an expert in PHP?

To answer that briefly in the first paragraph I should say, you need not master PHP to handle wordpress efficiently. Yes, it’s always good to learn and dig deep into the subject but your primary concern is WordPress. You want to master WordPress. And to that you need to learn few PHP things first.
For the next big jump, you need to dig deep in PHP also. And that will always remain a plus for your web development preparation. You may read some Advanced PHP 7 Articlesin this regard.

The first interaction between PHP and WordPress.

Consider a PHP array and try to figure out how it comes to help when you build up a customized wordpress page. An output of array follows first where I have used few names. To show their interaction I will later show you how wordpress categories can be produced through an array.

Array
(
[0] => Mona
[1] => Babu
[2] => Pota
[3] => Gopal
[4] => Array
(
[0] => Buddhu
[1] => Tutul
[2] => Tapas
)

)
Next we’ll see the code:
//after php 5.3
$frienfds = ["Mona",
"Babu",
"Pota",
"Gopal",
["Buddhu",
"Tutul",
"Tapas"
]
];

Can you associate this type of array with any wordpress code you’ve seen so far? Actually in real life of using wordpress we can use categories in place of names.
In the next wordpress example we’ve just done that to prove thier interaction.

Let us consider a wordpress array this time.

In this wordpress array we try to make sure few things first. In the ‘key’ part we’ve kept the wordpress key properties and in the value part we’ve set the values.

$args = array(
'taxonomy' => 'category',
'orderby' => 'name',
'show_count' => 3,
'pad_counts' => 0,
'hierarchical' => 1,
'title_li' => 'Categories'
);

wp_list_categories( $args );

 

This will give us a nice output of all our categories we’ve set so far for our wordpress site. The positive side of this usage is it will automatically update when you add more categories. Not only that, it’ll also automatically manipulate the posts from every category.
We can explain it this way.
Whenever you write a post, it may be assumed that you’ve done some research and set your categories accordingly.

Consider the output

Categories
general (1)
php (1)
wordpress (1)

How I joined multiple Bootstrap themes with my official WordPress site

I thought I should write down this without delay and share with my readers. These are bits and pieces of my experiences of writing my official website sanjibsinha.com. It was a kind of trial and error method that I had always expected that, well – touch wood, it’d survive somehow.
And it survived the experiments. Google started indexing it and I think the time has also come to play with Google analytic.
Let me finish it very fast and start from the very beginning.
I decided to inject multiple bootstrap CSS styling in my website. It’s a kind of bootstrapping wordpress.
As you know, when you start building a wordpress site from scratch you need few files at the very beginning. They are – style.css and few more PHP files like index, page, home, header, footer, sidebar etc.
I decided to make the front page a static page so I injected a ‘front-page.php’ file in that beginning procedure.
As of now I am keeping three styles – two of them are open source bootstrap theme and the other one is the mystery (please download it from my github repository).
The first step is – make your default style intact so that it does not break.
My ‘style.css’ code:
@import url('css/font-awesome.min.css');
@import url('css/bootstrap.min.css');
@import url('css/animate.css');
@import url('css/style.css');

body {

}

Next get the link in the ‘header.php’ file:

bloginfo('stylesheet_url');

I don’t want the ‘Home’ navigation in my first page menu bar so just excluded it with a simple code:
wp_list_pages(array('title_li' => '', 'exclude' => 4));
Remember wordpress keeps everything as ‘post’ inside database. My home page post id is 4 and I’m excluding it from the first page navigation.
You know the other wordpress pages more or less follow this same logic:

if ( have_posts() ) : while ( have_posts() ) : the_post();
I decide to get the permalink, time, title, and content after that so the functions are easy:
the_permalink();
the_title();
the_time('l, F jS, Y'); //you can change the format, please search in the codex
the_content()

You should also keep an error message if something goes wrong with your code.
_e('Sorry, there are no posts.');
As I said before: there are three themes as of now. So I need two more template files. One is for Blog and the other, the custom one is for any other purposes.
You need ‘header-blog’, ‘footer-blog’, ‘header-custom’, and ‘footer-custom’. And in the related template file don’t forget to write like this:
get_header('blog')
get_header('custom')

Besides these simple routine I decided to show one category in my custom styling. I’ll write this part in detail.
Finally my website looks like this:

The Home page:

The blog Page:

The Contact page:

The archive page:

And finally I decided to show my ‘PHP’ category posts in the custom styling:

So this is it. For full code please visit my Github repository:

GITHUB