Programming/Coding, Science

PHP 7: Scalar Type Declarations

One of the reason why PHP7 is actually a wall breaker of old PHP that leads to no more an ‘insane’ programming language for web development. Sure, the backward compatibilities and the baggage it brings are still there, but we need to understand that every language sucks for supports backward compatibilities.

It causes the designers/developers/community of the programming language generally enforce innovations much slower compared to others that are in their infancy or adoption phase. However, we cannot deny that backward compatibilities are also important for code reuse and that saves a lot of time and cost.

Old code works, so why reinvent the wheel? Anyway, what does this scalar type relates to backward compatibilities? Nothing, but it relates to the ecosystem of the PHP . Instead of redesign the whole language, the developers introduces several features for PHP 7that help the developers on programming a better quality with stricter typing features.

For anybody that tried Perl 6 and Golang gradual typing or Python’s type hints with mypy code analysis tool, you’ll find that PHP is not left behind as what the others has said about the language that they’ll probably use around last 14 years ago.

Science

How I launch Golang Web App Using Docker

Very useful for Golang developers.

Software Tools and Development

dockergolang

I have recently build and launch one monitoring web app in my current company. which to monitor our internal test and services running on different environment. I have build the app on go(golang) which I have really enjoyed to work. This is the technology stack I used:

  • golang(backend)
  • Gorrila (rest api)
  • javascript
  • chart libraries(d3.js, crossfilter.js and dc.js)

This is my first web app for which I used docker to launch on ECS. it’s running currently on our ECS instance without any issue. I went through some learning process to figure out, how to launch the app on docker. Anyway, I am writing the steps, I followed while launching through docker; May be it will help someone to launch using docker.

  • First Step: Create the Dockerfile

There could be different ways do build the dockerfile, I created following Dockerfile:

Please Note: Just make sure you write this file into your project…

View original post 187 more words

Science

Day 23 – Macros

Perl 6 Advent Calendar

Syntactic macros. The Lisp gods of yore provided humanity with this invention, essentially making Lisp a programmable programming language. Lisp adherents often look at the rest of the programming world with pity, seeing them fighting to invent wheels that were wrought and polished back in the sixties when giants walked the Earth and people wrote code in all-caps.

And the Lisp adherents see that the rest of us haven’t even gotten to the best part yet, the part with syntactic macros. We’re starting to get the hang of automatic memory management, continuations, and useful first-class functions. But macros are still absent from this picture.

In part, this is because in order to have proper syntactic macros, you basically have to look like Lisp. You know, with the parentheses and all. Lisp ends up having almost no syntax at all, making every program a very close representation of a syntax tree…

View original post 1,303 more words

Science

#981 – Full List of C# Keywords

Total standard C# keywords

2,000 Things You Should Know About C#

In C#, identifiers are names that you choose to use for things like variables, classes, interfaces, etc.

A keyword is a reserved name that has a specific meaning and that you can’t (generally) use as an identifier.

Here’s the full list of standard keywords in C#:

 abstract  add  as  ascending
 async  await  base  bool
 break  by  byte  case
 catch  char  checked  class
 const  continue  decimal  default
 delegate  descending  do  double
 dynamic  else  enum  equals
 explicit  extern  false  finally
 fixed  float  for  foreach
 from  get  global goto
group  if  implicit  in
 int  interface  internal  into
 is  join  let  lock
 long  namespace  new  null
 object  on  operator  orderby
 out  override  params  partial
 private  protected  public  readonly
 ref  remove  return  sbyte
 sealed  select  set  short
 sizeof  stackalloc  static  string
 struct  switch  this  throw
 true  try  typeof  uint
 ulong  unchecked  unsafe  ushort
 using  value  var  virtual
 void  volatile  where  while
 yield      

View original post

Science

Let’s Stop the Async Suffix Bullshit

There is a common pattern that is used in .NET APIs where anything that returns a Task has the suffix Async.

However, in reality this is just another form of Hungarian Notation. “But Microsoft do it in the BCL” you may say. And of course you are right. Buts lets be clear – they had to as they already had synchronous versions of the APIs from previous versions of .NET.

So the Async suffix really came from expediency rather than a proposed standard pattern. In fact, where the API already support the Event Async Pattern (EAP) there already existed a version of the API with an Async suffix so they had to use TaskAsync to disambiguate.

If you have to support both a sync and async version of an API then maybe still use it – or rather, to encourage async interaction suffix the synchronous version with a Sync suffix…

View original post 28 more words