Archivio mensile:Novembre 2017

From 2D to 3D Internet: how the web could change and (even) take us

Internet it is almost become part of the daily lives of most of the inhabitants of this planet. In the last 30 years the web ‘revolution’ has proved to be one of the fastest changes in humanity thanks to the innumerable benefits that the sharing of information has brought to all people, without distinction between them.

 

Today, a lot of people spend a negligible portion of the day connected to the Net, by means of the various connected devices such as smartphone, tablets and computers. Changes have been so rapid (and still they are, because the thing is going on) that we didn’t realize about them, including the fact that a lot many things in our lives are becoming ‘digital’.

 

The Internet allows us to get the information in real time (with all education roles and related utilities) and to share it, to contact with our loved ones, then it has an entertainment function (games, apps,…), and moreover many people make money online to such an extent that some remote work is more profitable than one in the real world (and, by the way, today everyone knows that to make ‘big’ things you have to work on the web).

There are even people who spend more than half of their day in front of the internet.

Some time ago I read an article saying that nowadays, unlike the past times, we are just ‘avatars’, with a clear reference to the fact of the social profiles and the photos we publish to share ourselves.

I’m not here to talk about these things but about the fact that in such a hypothetical situation like to become avatars, Internet will certainly becomes our virtual world, or our second-half together with the real world. Then, when i see how much how fast internet and its related technologies are growing it appears clear to me that this virtual world is a world we are already building.

You could imagine the internet as a three-dimensional space, and not as a two-dimensional window sequence (as it is now). The web would in fact become 3D as well. One could think of three-dimensional data, as well as objects, and a weighted exchange with the perception of the real world. Anyway, the essential thing about this question is that we would be inside, probably along with other people, and that would mean a virtual world similar to the real one, along with  the same features,  such as websites similar to places (banks, libraries,…) where you have to move to reach them.

There is also the possibility that the virtual web world will remains as it is, a  two-dimensional succession of windows on the browser.  In that case we will feel exactly the perception we now have when look the screen of the smartphone or the computer except that in an avatar world there is no body.

 

How to recover data from a damaged hard drive disk: A brief guide

“My hard disk fell on the floor and it’s no more recognized” 

“A clicking noise come from my hard disk, then files are no more accessible”

These are, among common tech users, the most common symptoms of a dying hard disk drive. Usually these kind of things happen when you’re hdd gets a hit (when it crashes on the floor for example). Other times is the old age of the device causing malfunctions and sometimes the issue apparently seems to burst forth without any reason.

The hard disk from inside

But let us first take a look of an hard disk device internally. Data are stored on a platter and read/write functions are made by a magnetic head placed at the end of an actuator arm which moves depending on when data are placed.  Actuator is controlled by a PCB controller hosting connectors and usually located down to the device.

When an hard disk is damaged there are 2 kinds of failure: physical and logical one. In logical failure just data are damaged and not the device itself, while in the physical failure case one of more of the components of the hard disk drive are malfunctioning (most common are damages of PCB or issues with the actuator and the magnetic head.

Clicking and other kind of noises and sounds

Many people realized their hard disk is damaged first before seeing it is not responding on the computer. This happens because of the typical noise of dying hard disk, usually known as the “click of death”. But, what is the click of death? Well, just the arm moving back and forth among the platter until it reachs its physical end (the spindle) [from point 1 to 2 in the image]. On the other hand any hard disk drive makes a small sound, but in most cases you can’t hear it.

Then the arm normally moves on the platter from its start to the point where data are placed and on that point read/write functions are performed. When the device is damaged the arm moves continuously because it can not find data on the prescribed point, so it comes back and and the operation is repeated.

People reports various kind of noises in the damaged hard disks: these different noises are caused by different types of malfunctioning. For example if the arm is damaged, it makes a shrill noise because of the contact with the platter. Other kind of noises are procuced when spindle (image 1) is damaged and platter can not spin at its prescribed speed or PCB is not working properly.

Recovering data from a damaged hard disk

Recognized hard disk 

When an hard disk starts giving issues, first step to do is to understand if it is recognized by the computer.  If it is, then you have to save all your data immediately to another device because you will most likely see it disappear at 2th or 3rd run after the first malfunction. Obviously it does not always disappear, but this is the damaged hdd behaviour so in the vast majority of cases. You can easily save your data creating with a lot of disk imaging and cloning software (ddrescue, run with linux, it’s the most used) or even with recovery software some of which can create, and save, a disk image of your damaged device.

Not Recognized hard disk 

Recovering data from a not recognized hard disk is a slighty harder target: it has to be considered that this does not means that data are irrecoverable nor that the device is dead: indeed it can still be recognized by the BIOS of your computer: if it so, best way to recover data is to run Ddrescue or use an hard disk imager (Deepspar PC-3000 or Atola Imager). These devices can access to the data at the lowest level when they are not responding to the computer reading system.

Professional Recovery

If none of these options is workable, the only way to approach to the damaged hard disk with an almost good chance to recover data is to send your device to a data recovery center, which will use more detailed ways to recovery, such as direct reading hard disk platter. Usually these company ask a fee between 500 and 2000 or more dollars for a standard (500 GB-2 TB) recovery, so even if it remains the option used by some people like business men, many people prefer to lose their data instead of paying their quote.

Household methods

Such Household methods like putting the hard disk in to the fridge and freezing it or place a fan on the device to cool it and make it working again are become very popular among the web, but, even if someone have succeded using these ways, the vast majority of people do not benefit from it
and on the other hand there is no accurate literature on these cases in order to express themselves.

Then, a self-repair attemp seems the only way to approach to the damaged hard disk: you can perform 2 kind of self-repair approaches: first one is the PCB replacement, second one is to physical displace the entire hard disk except the platter.

Swap the Hard disk PCB

In order to make a PCB Replacement you will need a PCB controller, exactly the same as your hard disk model. Buying a single PCB can be sometimes very expensive so it is usually to directly buy another hard disk equal to the one you own (hard disk number and firmware version must coincide). Once you get the hard disk you need to remove the PCB to replace it in to the damaged hard disk instead of the previous one.

Swap the Hard disk platter

Removal is very simple: unscrew the hex screws that connect the PCB to the new hard disk, do the same for the damaged one, and place the new board on the old one. Then you can try to run the device and see if it works. If not, the new hard disk you have bought will be useful again: you will need to swap the hard disk platter. This task consists to remove, very carefully, the platter from the damaged hard disk, and then put in on the new hard drive instead of the new platter. An advice: performing the platter swap pay attention to the arm and the magnetic head: any alteration of the same will not only cause the device to continue malfunctioning, but also it will make it unrecoverable because of further damages.

 

 

 

 

 

Str_replace that En Dash (or minus sign)! How to fix the problem when it’s not working

Building my first theme on WordPress I had been a very long time in to understand how to use str_replace function to change title of a page to remove all the words following another. This was approximately the string to change: i had name and surname of a specific person (John Doe) and what i wanted to do was to remove all the rest of the phrase.

Page Title:  John Doe Contact Page – Sitename

String i wanted to get as result after str_replace:  John Doe

So practically i had to get just “John Doe” from that page title. The easiest way i knew was to use str_replace function in PHP in the following way:

  • Getting the WordPress Title as a variable:

<?php

$string = get_the_title();
$replace = ” Contact Page – Sitename”;
$replacewith   = ” “;

?>

  • Then using str_replace to change the title and print the result:

<?php

$string = str_replace($replace, $replacewith, $string);

?>

Unfortunately first attempts didn’t working and the result i got was just the input string ($string) without any replacement. Then i just cruised on the internet and after failed attempts to understand why i didn’t get my hoped result I decided to try to remove just the last word of the input string to check str_replace function was actually working.

Input:  John Doe Contact Page – Sitename

String i wanted to get as result after str_replace:  John Doe Contact Page –

Well, it worked. So i realized that probably the issue was that dash in the middle of the title. To be honest I did not know it was called “dash”, I just used to call it “minus” and type it very simply using these keyword keys:

But, it was so. And i found there’s not just one dash but as many as 5 different types, two of which very very similar to each other. Wikipedia explain fairly clearly the difference between them.

So, you can figure out that figure dash and en dash are pretty similar each other, and they are also different from the minus sign (-) of the keyboard. Opening page source in the browser I got confirmation that in my case it was a endash, then sign was not show as itself but with HTML/XML numeric character reference &#8211; from which i could understand what it was.

At this point I repeated the str_replace on my string just not using the sign but the appropriate HTML/XML code (previously I was using “minus” sign).

This was the page title as well as it appeared on the browser:
John Doe Contact Page – Sitename

This was my wrong way to write it:
John Doe Contact Page – Sitename

The properly way to str_replace an endash sign:
John Doe Contact Page &#8211; Sitename