Miss All Sunday

Found my old phone!


Nope, thats not it, mine is all dusty and scratched :P  I just picked up a generic image for the structured data stuff, you know, gotta keep google happy...


I remember how awesome was to have one of these, I literally work for 2 complete summers to be able to buy one!

mmm I still remember taking the Trolebús back to my home, it was a 20 minutes commute, up to 40 or 50 if it was a rainy day.

I used to sit at the back of the bus, watching people come and go, trying to figure it out why they were there, what they were thinking, what was their destiny? maybe they were heading back to their homes or school or work.

It is curious, in a bus full of people you feel completely alone, or rather not alone but just, disconnected, Johnny Depp could had sit next to em and I wouldn't had noticed... it was just me and whatever music I was listening back then.  Too bad the phone doesn't have a memory stick anymore, it would have been awesome to "discover" the type of music I used to listen.

It still has a few messages and it feels incredible weird to read them.... kinda embarrassing too :P

Oh I surely miss my old phone, I wish I could use it again, well I suppose I could but dunno, it will feel incredible weird doing so...


Anyway, it is awesome how one object can bring back soo many memories...  stuff that I simply had forgotten about it for whatever reason now feels incredible fresh on my mind, almost like it was yesterday although some details are still missing or could be wrong but damn...


Now that I think about it, it would have been totally awesome if I had left a message for my future self, a message from me at 2006/07 to the 2016 me  :P  I wonder what kinds of things I would have said to me at that time. I guess I can do it now for the future me (the 2026 me) although I have no idea what should I write :P  thats something that prob hasn't changed in the last 10 years :D

Jul 09, 2016, 05:02 PM query_builder
Write Comment chat_bubble_outline
face

Closures as properties in PHP


I've dealt with this particular issue more than once, you define a nice and dandy closure and you assign it to a property for easier access and re-utilization:

Code Select
<?php

class Something
{
    public function init()
    {
        $this->myHandyClosure = function ()
        {
            return 'I am awesome!';
        }
    };
}
?>

And then you naturally want to use your handy closure whenever possible:

Code Select
<?php

class Something
{
    public function init()
    {
        $this->myHandyClosure = function ()
        {
            return 'I am awesome!';
        };
    }

    public function doSomething()
    {
        return $this->myHandyClosure();
    }
}

?>

If we run this will get a nice fatal error message:

Code Select
<?php

$var = new Something();
$var->init();
$var->doSomething();

?>


Fatal error: Call to undefined method Something::myHandyClosure()

Thats because PHP treats $this->myHandyClosure() as a method.

There are a couple of solutions for this, __invoke and ReflectionFunction() seems the most common ones but I simply don't like them, for no particular reason.

What I do instead, is turning my property into an array:

Code Select
<?php

$this->myHandyClosures = array(
    'awesome' => function ()
        {
            return 'I am awesome!';
        },
);

?>

Since the property is now an array there will be no ambiguities:

Code Select
<?php

class Something
{
    public function init()
    {
        $this->myHandyClosures = array(
            'awesome' => function ()
                {
                    return 'I am awesome!';
                },
        );
    }

    public function doSomething()
    {
        return $this->myHandyClosures['awesome']();
    }
}


$var = new Something();
$var->init();
print $var->doSomething();

?>


Besides avoiding the extra load of calling __invoke or use ReflectionFunction() it allows me to group all my helper closures, even if there is just one, its easier to add a new key into an existing array than creating a new var, easier to handle, easier to maintain and easier to upgrade too.  The array can even be upgraded to a full service container.

Jul 01, 2016, 09:33 AM query_builder
Write Comment chat_bubble_outline
face

Bye Opera, welcome Vivaldi


I've been having issues with Opera recently, can't really tell if its just my machine or not but ever since I upgrade to Opera 35 or 36 (cannot remember well) It started to crash for no reason...

I've been an Opera user for quite some time now so I figure it out I'll give it a chance and try to live with these constants crashes but it has now become way too common, for example, it now crashes on the start page, not even a web page is open and its already crashing...

I don't want to blame Opera, I really don't but since it is the only browser that does this and it all started since it got upgraded, chances are it is Opera...

So...  what are the options mmm lets see...

Chrome?  no thanks...
Firefox?  way too bloated and every time I try to use it it auto updates it self first..... highly annoying....
Edge?  nah...


Reading about possible solutions to Opera I stumble across Vivaldi, I already knew about it but I recall I dismissed because it was still in beta and lacked a few things I like. So, a few years later I discovered Vivaldi is already on its 1.2 version and decided to give it a try.


It was nice and quite useful to be able to import everything from Opera, the bookmarks and passwords and all that stuff.

Gotta say, so far so good, it feels like Opera which is a good thing for me, plus it can install chrome addons, another big plus, these days I can't live without ghostery :P

The start page got imported as bookmarks but thats OK, I can spend a few moments adding those sites again.

Anyway, I didn't liked when Opera became Chromes's bitch but I kept using it precisely because it was still fast an reliable to use, now with the constant crashes (again, I don't know if it just me or not)  I can't keep using it.


The only thing I miss its the sync thing


Jun 27, 2016, 12:57 PM query_builder
Write Comment chat_bubble_outline
face

Pequeñas cosas



Es increíble como las pequeñas cosas,  los pequeños detalles,  esos pocos instantes cambian por completo tu día.
De tener un pésimo día lleno de quejas tráfico y demás un simple gesto inmediatamente te cambia el ceño fruncido y de repente tu humor cambia.

Incluso el dolor de cabeza desaparece hahaha

En fin,  mientras escribía el título me acorde de esta cancion:



Que de hecho no tiene nada que ver con lo que estoy escribiendo hahaha solo me acordé de la canción 🎶

Oh bueno,  a tratar de mantener este raro pero ciertamente bienvenido estado de ánimo

Toda happy la jess  😊 hahaha

Jun 16, 2016, 08:33 PM query_builder
Write Comment chat_bubble_outline
face

Ohara YouTube Embed 1.2.6

A new version has been released:

1.2.6 - May 29, 2016,
- Add support for full screen videos.
- Remove multiple calls to this.responsive().
- Check the width and height of parent div before applying changes.


To upgrade just uninstall any previous version and install the new one and don't forget to check the "Install in Other Themes" checkboxes for all your installed themes.

To download the new version go to the mod's release page at github or SMF

May 29, 2016, 10:49 AM query_builder
Write Comment chat_bubble_outline
face