littlelogs

Keep a social journal of your work progress as you make and learn things.

#php

March 2017

josh
josh

Decided my project this weekend is to move my blog, built on very very old #php I wrote not long out of uni, to a static site generated by #pelican. Getting set up didn’t take long, but I’m glad I’m already familiar with #python as the docs are a bit lacking. Also, geez, all the free themes look designed by developers — a couple are nice but most are just passable and the rest are outright ugly.

I found a theme that wasn’t too bad and spent the afternoon customising it to match what I was after. Think that’s done, at least for a first pass, so tomorrow (or next weekend) I’ll need to export my old blog posts into pelican and then deploy the new blog (and some redirection for old urls).

September 2016

rhitakorrr
rhitakorrr

I’m writing up my log now to encourage myself to actually stop working for tonight.

Today I was told that the failed #OpenCart upgrade I attempted actually did leave behind some errors. Not too surprising. I don’t know OpenCart; I’m just that “hey, you’re good with computers, right?” guy. So, it’s kind of broken now. It looks like OpenCart has somehow managed to render a smaller version of itself inside one of its own templates. I dug through the templates and saw no trace of what was causing this, and I’m not about to blindly debug thousands of lines of #php. For now, it still works. It just looks stupid. I’ll look at it again over the weekend.

On a brighter note, I spent a good amount of time reading up on #aeson today and managed to get it to parse a JSON version of my résumé for my #hakyll_portfolio_blog. Tomorrow, I’ll try to get that data into my #hakyll template.

For now, I’m gonna make some popcorn, finish Twin Peaks, maybe read for a while, and get some much-needed sleep.

April 2016

March 2016

pauldotdo
pauldotdo

Decided to start learning to #code. Partly spurred by an unexpected but very gracious web development client. Trying out a few code schools. Scattergun approach. Joined Team Treehouse as a complete #beginner, completed 2 initial modules.

January 2016

loudmouthman
loudmouthman

#AWS #PHP #BASH
Its not event 10:20 and this morning i have edited a legacy php system to include an extra column of data which apparently has never appeared on a export and has only just been discovered. Ive recovered a lost xls file for a client because they are sloppy clickers and had dragged it to another share. I have configured a jailed user account with their own secure key and access to a folder on the filesystem so they can upload files directly. I have checked in on a STEM event I am helping deliver this evening and I have not even had my second cup of coffee.

loudmouthman
loudmouthman

#wordpress #php in the land of debugging the log file is king. In my case the ability to add a little write_log function to other peoples themes just to see the step through of code in invaluable. I miss the days of the visual studio with its tidy IDE and its ability to step through code and add breakpoints and watches. In the world of php and coding on remote servers the log file is where I export my findings. I cant remember where I sourced the original code ( sorry ) but it goes into functions.php of the target theme.

if (!function_exists('write_log')) {
    function write_log ( $log )  {
        if ( defined(WP_DEBUG) ) {
        if( WP_DEBUG=== true){
            if ( is_array( $log ) || is_object( $log ) ) {
                error_log( print_r( $log, true ) );
            } else {
                error_log( $log );
            }
            }
        }
    }
}


// now you can call writelog('write something to the debug.log');  and all is well 
williamsdb
williamsdb

Really frustrating day trying to debug a #php session issue which I discovered on Friday. I can’t move forward until I have resolved it.

Sirpaulus
Sirpaulus

Technologies

  1. User Stories - I will use #Trello as my agile storyboard / user story management and change management
  2. Wireframes - I will use #Axure for wireframes and mock prototyping.
  3. Environment setup - I will use #XAMPP on a local machine with #MySQL as the chosen database and #PHP as my chosen programming language.
  4. Code Management - I will use #bitbucket to practice the behaviour of managing code branches and merging.
  5. Other Technologies - I will employ #css but most probably a bit later once the functional aspects have been covered. The likelihood also is, if I find another technology which assists in meeting the use case and it can be implemented I will. i.e. #JSON / #JQUERY.

Conclusion

Thanks #Littlelogs community for the opportunity to share this with you, sorry the post is too long.

loudmouthman
loudmouthman

#php, #UTF8 Every now and then utf8 and multibyte encoding rears its head; I struggle with this stuff and I dont know why. Let me make a note here though that I can check for the presence of unicode

 if (strlen($content) != strlen(utf8_decode($content))){
                                echo "So $content contains one or more  unicode character \n";
                                $convertedString=mb_convert_encoding($content ,"UTF-8","HTML-ENTITIES");

                                echo "replacing\n $convertedString  \n\n $content \n\n\n";
                                }
                }

Just a note here .. I HATE utf8

December 2015

ddbeck
ddbeck

For work, I worked a draft of a blog post announcing WordPress 4.4 availability. As a part of that, I toyed with benchmarks of WordPress 4.4 under PHP 7.0 versus PHP 5.6. I was under the impression performance gains would be pretty obvious, but it turned out that it depended heavily on how the test site was configured (i.e., CGI or FastCGI). So explaining that will be an interesting problem for tomorrow.

In the evening, I worked on responding to some Python Packaging User Guide comments and reading some more readmes. Today was the earliest sunset of the year, so I’m going to fling some Kerbals into space now.

#WordPress #php #readme

ddbeck
ddbeck

For work, I did some tidying up of a script that helps me manage some contextual help text. Previously, the script verified the appearance of certain notices based on other UI strings—a fragile, “stringly typed” situation. Today, I updated the script to check on proper database fields. Not a lot of writing today, but it was nice to exercise my programming skills a little.

Oh yeah, that announcement #blog post I wrote is up. Linked as promised.

Today I also did my first review of a contribution from a Python Packaging User Guide volunteer. It’s been a while since I’ve been an editor, so I had to be very careful to distinguish, for myself and for the contributor, between how I would write something and how the writing can be improved. They’re not the same thing! Lousy editors don’t know the difference—even if their own writing is excellent—and I don’t want to be a lousy editor.

#docs #python #php #editing #writing

ddbeck
ddbeck

Today, I wrapped up a draft of a #blog post announcing the availability of #PHP 7 (I don’t think it’s been published yet, however). Aside from the voice issues I wrote about yesterday, it’s also hard to write about changes to a language I don’t actually use. I did learn a lot about PHP though. Ultimately, I wasn’t super satisfied with I wrote, but it’s not worth spending tons of time on on something that’s ultimately ephemeral.

In other news, I recently wrote a contributor guide for the #Python Packaging User Guide. Today, I notified some volunteers about ways to start contributing. I’m excited to start doing editing work with the volunteers!

November 2015

sunscreem
sunscreem

Today was mainly spend cursing myself for not giving better instructions to my co-developer. We are converting an old #php site to #laravel. The new website has to work side by side with the old one for a short time. I understand the old one, my co-developer is new to it so I made all sorts of assumptions on what he would ‘get. Lesson learned! Other than that.. I’ve decided to start a wee site project. More on that when (if) it happens :)

josh
josh

Today I tried to do some support for an old #PHP site that I wrote in 2006. Yep, almost ten years ago — I know because past me copyrighted the code and included the year. Ha! Like anyone would want to steal it.

I concluded that somehow session storage isn’t working, which is why nobody can login (their user details aren’t being persisted into the session, they’re just disappearing). However, with the passing of time plus the fact this client’s site is now hosted on Windows (bluuurghhh) I’ve had to give up and ask my designer boss-for-that-project man to take it up with the hosting provider, because I haven’t a clue. Hope he can get it sorted.

October 2015

September 2015

mrtwj
mrtwj

Going overboard with #php type hints. I'm not sure why more scripting languages don't make strict typing optional/mixable.

josh
josh

Finished off my #client work today, grappling with #Django admin and trying to extend it to do stuff it isn't meant to do.

I stand by my opinion — do not use the Django admin to make a client-facing admin site, build your own. Or soon enough you will spend all your time working around it.

May 2015

March 2015