The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,839 other subscribers

Archive for the ‘JavaScript/ECMAScript’ Category

Chrome does not pick up on time zone changes until the browser is restarted. (via: pellepim / jsTimezoneDetect / issues / #57 – Wrong time zone using Chrome on Mac — Bitbucket)

Posted by jpluimers on 2014/02/11

Just got bitten by Wrong time zone using Chrome on Mac:

Chrome does not pick up on time zone changes until a new tab is opened or the browser restarted.

Actually, it requires a browser restart, as below is the difference between a new Chrome tab and running on jsc on the console: Read the rest of this entry »

Posted in Chrome, Development, Google, JavaScript/ECMAScript, Power User, Scripting, Software Development | Leave a Comment »

Mac OS X: How do you run JavaScript script through the Terminal? (via: Stack Overflow)

Posted by jpluimers on 2014/02/11

Now I have these aliases in my ~/.bash_profile:

alias jsc='/System/Library/Frameworks/JavaScriptCore.framework/Versions/Current/Resources/jsc'
alias JavaScript='/System/Library/Frameworks/JavaScriptCore.framework/Versions/Current/Resources/jsc'

Now I can use the WebKit jsc from the console.

Thanks User microspino – Stack Overflow for this answer: Read the rest of this entry »

Posted in Apple, Development, JavaScript/ECMAScript, Mac, Mac OS X / OS X / MacOS, Mac OS X 10.4 Tiger, Mac OS X 10.5 Leopard, Mac OS X 10.6 Snow Leopard, Mac OS X 10.7 Lion, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, OS X 10.8 Mountain Lion, OS X 10.9 Mavericks, Power User, Scripting, Software Development | 1 Comment »

Ready to cast: Chromecast now open to developers with the Google Cast SDK #interesting #fun (via: Chromium Blog)

Posted by jpluimers on 2014/02/03

With a more decent internet connection during our trip, it is time to catch up on some recent news.

The first that caught my eye was that the Chromecast API now is open to all developers.

Developer information is available through Casting Your Content to the Big Screen – Google Cast — Google Developers.

You need to pay a one-time USD 5 fee per development account (how’s that Apple?) for the Google Cast SDK Developer Console.

After that, you will have to register your Chromecast device(s) and custom or styled media receiver apps.

Interesting. Fun.

I hope this can be combined with the new Smart Mobile Studio 2.0 release or the Delphi for Android support.

Will get back on that as soon as I’m back home.

Resources:

More links:

–jeroen

via: Chromium Blog: Ready to cast: Chromecast now open to developers with the Google Cast SDK.

Posted in Chrome, Chromecast, Delphi, Delphi XE5, Development, Google, JavaScript/ECMAScript, Pascal, Power User, Scripting, Smart Mobile Studio, Software Development | 1 Comment »

Read-Eval-Print-Loop with a twist: repl.it

Posted by jpluimers on 2013/12/26

Just found out about the repl.it site that allows you to do a Read-Eval-Print-Loop with 15 different languages running from within your browser.

Really: from within your browser. Your browser becomes a console “IDE” by first translating the language to JavaScript then executing it on the browser.

They have all their code in a Git repository, with at the root implementations of those languages.

There are only a few pages on the site to complement the “IDE”:

According to their @replit twitter feed they have been around since about September 2011, but there are still regular updates.

–jeroen

Posted in Development, JavaScript/ECMAScript, Scripting, Software Development | Leave a Comment »

Cyber-Dojo: practice unit-tested programming in pairs/groups using Katas

Posted by jpluimers on 2013/11/07

Wow, I’ve been living under a stone (:

Just discovered the online Cyber-Dojo by Jon Jagger. It is an online manifestation of a Coding Dojo. Both have been there for years, and I think both are brilliant.

They take the concept of a Dojo as being a place to practice sports like martial arts in a pair or group setting with a series of Katas or practices.

Katas in a Dojo are a means for performing deliberate practice in order to learn new things. For instance, acquire new movement techniques, learn about your balance, gain strength, all in both a physical and mental way.

The aim of both is do more deliberate practice.

When performing Coding and Cyber Dojo, you should use Test Driven Development using pair programming and BabySteps. Those help you to slow down, as one of the Dojo Principles is for Katas to slow down. It reminds me of the “if you are in a hurry, sit down” mantra and is a key part of the Coding/Cyber Dojo Principles too.

The aim is to learn, and part of that is to first un-learn and open you to new thoughts. That’s why it is so cool that the Cyber-Dojo provides you with:

  • a bunch of pre configured programming languages*,
  • preformulated practices** (including a few cyber-dojo refactorings),
  • a small boilter plate to get started.

You’d think they speed you up, but that is not their aim. Like a regular Dojo it gives you an pre-set environment and gives you piece of mind to get started.

The Cyber Dojo does without a Sensei, whose purpose in a Coding Dojo is to ask questions in order to guide the participants.

That’s why it is good to use the Cyber Dojo as part of a Coding Dojo: basically the Cyber Dojo provides a standardizes set of tools to quickly setup a Coding Dojo.

Cyber Dojo languages

(a prime number, so the table is a bit distorted)

C Go PHP
C# Haskell Perl
C++ Java-Approval Python
Clojure Java-Cucumber Ruby
CoffeeScript Java-JUnit Ruby-Rspec
Erlang Javascript

Cyber Dojo practices

Many of the practices come from rosettacode.org.

100 doors Harry Potter Print Diamond
Anagrams LCD Digits Recently Used List
Bowling Game Leap Years Reversi
Calc Stats Mine Field Roman Numerals
Count Coins Monty Hall Tennis
Diversion Number Names Unsplice
Fizz Buzz Phone Numbers Verbal
Game of Life Poker Hands Yahtzee
Gray Code Prime Factors Zeckendorf Number

–jeroen

via:

Posted in .NET, Agile, C, C#, C++, Development, Java, JavaScript/ECMAScript, Perl, PHP, Scripting, Software Development, Unit Testing | 3 Comments »

CodeRage Mobile day 2 QA

Posted by jpluimers on 2013/06/19

I had a bit of trouble getting into CodeRage Mobile: somehow the confirmation email never reached the pluimers.com servers. After retrying today, @EmbarcaderoTech sent a GotoMeeting link that worked.

Later I will try to trace back about the mail issue (:

I’m in now, and since I usually loose the QA information, here is a dump of the QA for today so far.

Will try to find time for post editing and getting the URLs clickable.

Welcome to CodeRage Mobile! Read the rest of this entry »

Posted in Barcode, Delphi, Delphi XE4, Development, FireMonkey, JavaScript/ECMAScript, jQuery, OS X FMX, Scripting, Software Development | Leave a Comment »

Best 404 page ever.

Posted by jpluimers on 2013/01/24

Very distracting: 404.

Thanks Julian (I just found out you also own a Dutch domain jmbk.nl/) for pointing to it (boy, some unproductive days ahead) and the cheat (in your browser, Open the JavaScript console, then paste and run the cheat code).

Thanks Romain for developing it.

When you read through his java script code files, remember that these french-english translations:

  • etat == state
  • tombe == fall
  • paraOpen == opened parachute
  • mort == dead
  • flocon == flake
  • taille == size
  • vitesse == speed
  • écrase == crash
  • marche == walk
  • neige == snow

--jeroen

via: Développeur Web sur Lille (59), Romain Brasier.

Posted in Development, JavaScript/ECMAScript, Power User, Scripting, Software Development, Web Development | Tagged: , , , , , , | Leave a Comment »

C#: any c# – .NET Enumeration allows comma in the last field – Stack Overflow

Posted by jpluimers on 2012/12/06

Thanks Nick Craver for answering this on StackOverflow.

Array initializers can be specified in field declarations (§17.4), local variable declarations (§15.5.1), and
array creation expressions (§14.5.10.2).

The array initializer can end in a comma, which makes some things way easier (boy, I wish I had this in other programming languages).

From Nick’s answer:

It has no special meaning, just the way the compiler works, it’s mainly for this reason:

[FlagsAttribute]
public enum DependencyPropertyOptions : byte
{
Default = 1,
ReadOnly = 2,
Optional = 4,
DelegateProperty = 32,
Metadata = 8,
NonSerialized = 16,
//EnumPropertyIWantToCommentOutEasily = 32
}
[/language]By comment request: This info comes straight out of the ECMA C# Specification (Page 363/Section 19.7)

“Like Standard C++, C# allows a trailing comma at the end of an array-initializer. This syntax provides flexibility in adding or deleting members from such a list, and simplifies machine generation of such lists.”

–jeroen

via c# – .NET Enumeration allows comma in the last field – Stack Overflow.

Posted in .NET, C#, C# 1.0, C# 2.0, C# 3.0, C# 4.0, C# 5.0, C++, Delphi, Development, Java, JavaScript/ECMAScript, PHP, Software Development, VB.NET | 5 Comments »

Simple SharePoint CAML Query Tester using jQuery & SPServices –

Posted by jpluimers on 2012/10/23

Interesting SharePoint CAML XML trouble shooting tool:

this script is NOT meant to help you *build* your queries. There are other tools for that. This is purely a testing tool to help you during those “doh” moments.

-jeroen

via: Simple CAML Query Tester using jQuery & SPServices –.

Posted in .NET, Development, JavaScript/ECMAScript, jQuery, Scripting, SharePoint, Software Development, Web Development | Leave a Comment »

xkcd: Click and Drag

Posted by jpluimers on 2012/09/19

xkcd: Click and Drag: a brilliant piece of JavaScript with images at http://imgs.xkcd.com/clickdrag

–jeroen

 

Posted in Development, JavaScript/ECMAScript, LifeHacker, Power User, Scripting, Software Development | Leave a Comment »