Better HN
topnewbestaskshowjobs
Log inSign up

btraut

3 karma · joined Jul 16, 2011 (15y ago) · 4 submissions

Submissions

1.

Graduate from Single-Session Coding: My Full Agentic Coding Workflow(medium.com ↗)

3 points · by btraut · 8mo ago · discuss

2.

Closing the Loop – Optimizing the Agentic SDLC(medium.com ↗)

2 points · by btraut · 8mo ago · discuss

comment 15y ago · link · parent

So this is why PSN was hacked? Were the user passwords also served to users in plain-text and evaluated in Javascript?

comment 15y ago · link · parent

The other <pre> and print_r()-based solutions don't work quite as well when you're writing an AJAX-based app. I use error_log for everything:

  // PHP error_log() wrapper
  function el($var, $die = true) {
     error_log(var_export($var, true));
  
     if ($die) {
        die();
     }
  }
Also, Paul Irish's Javascript log() function is amazing. It can be found in boiler plate, but here's the gist:

  // Javascript console.log() wrapper
  window.log = function() {
     log.history = log.history || [];
     log.history.push(arguments);
  
     if (this.console) {
        console.log(Array.prototype.slice.call(arguments));
     }
  };