Showing posts with label programming languages. Show all posts
Showing posts with label programming languages. Show all posts

Tuesday, January 21, 2020

Microsoft's Project Verona - New Programming Language Research

I haven't had much time to blog, but had to highlight this.

Microsoft's New Programming Language - Project Verona



This is very interesting to see Microsoft "claim" continuing contribution to the development of Rust but research and develop its own new programming language comparatively to Rust.

Thanks to CodeProject for this update.

Monday, July 8, 2019

Review: MIT's New AI Programming Language

In a field that continues to grow and gain lots of media press, I found this article very interesting. Like, why would a top tech institution create a new programming language for artificial intelligence when other tech giants have already worked hard to perfect existing programming languages for artificial intelligence? Perhaps I need to play with these programming languages more to understand?


Read Article

https://interestingengineering.com/mit-says-their-new-ai-programming-language-makes-ai-more-accessible-to-everyone


List of Existing AI Programming Languages

I don't all of the programming languages out here, but I know about these:

https://www.python.org/
https://lisp-lang.org/
https://www.swi-prolog.org/
https://www.haskell.org/

References


Wednesday, April 17, 2019

Refresh: Not a Number (NaN)

Today I answered the question from Enki on NaN (i.e. not a number). I failed (along with 40% of other developers).


My failure could be due to my lack of experience using NaN. Nonetheless, here's the explanation by Enki.


Wow, I never knew that there was an IEEE 754 standard corresponding to the NaN value. So naturally, I had to learn more because the simple explanation from w3schools was insufficient and I never ran into a case where I had to examine NaN === NaN or even NaN == NaN. Since I already knew what the comparison operator (equal type, equal value), I thought it could apply the same understanding as with the null object and undefined constant (see JavaScript data types).



But, I didn't see any quick examples from w3schools (my main online reference for quick understandings on standard web languages). Before I start digging, I refreshed my understanding from the quick lesson JavaScript's Numbers and now notice this new reference to the IEEE 754 standard. I definitely don't remember seeing that there, but could just be me.


Integers have an accuracy up to 15 digits - got it. Now, JS Numbers are always 64-bit double data types - got it. Reading further on this page, definitely don't remember an "Infinity" and I rarely remember the HexDecimal. Needless to say, refreshed my understanding of NaN.




Finally, refreshed my understanding with using the equality operator on objects. Unless comparing standard JavaScript data types (implicitly via var declaration), the object type doesn't matter because whenever two defined objects are compared the result is always false.

Mozilla provides further explanation with comparing NaN and its usage.



Okay, that's cool, but where did Enki get there explanation saying that all NaN will never have the same value?

I don't know and it would help if Enki did provide this online reference.

ICYMI like me, NaN is not just used in JavaScript. Surprise, that's right! So, double check your programming language if it has NaN (and Infinity).

Happy Coding!


Programming Languages using NaN (Brief List)



References






Thursday, March 28, 2019

Review: Fall and Rise of Dart

If you are a current iOS or Android developer, you may face a bit of a learning curve if you choose to embrace Flutter. However, it might be worth the jump—both for hot reload (an awesome feature), and for the opportunity to work cross-platform. - David Bolton

Read Article

This is especially attractive to read (or hear) after watching the "Highlights from Flutter at World Mobile Congress 2019"


Thursday, February 21, 2019

Avoid inconsistent Date object definitions

I recently took a pop-quiz question on this, and failed. Errrrr...

Pop Quiz

What is the Date value of the following code?

new Date(2016, 5, 31);

My Answer:

May 31, 2016

Makes sense, right? At least to 70% of us developers who are not JS experts?

See more fun questions at https://app.enkipro.com.

Correct Answer:

June 1, 2016

Since JavaScript early days leveraged a lot techniques and patterns from Java, I looked up both definitions.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#Syntax
https://docs.oracle.com/javase/8/docs/api/java/util/Date.html#Date-int-int-int-
https://www.w3schools.com/js/js_dates.asp

My Further Thoughts

With all the new technologies and programming languages (along with updates to these languages), I'm actually shocked that we haven't provide better consistency with a common class instantiation like the Date object. Particularly, in JavaScrpt.

Since the Time parameters all start from 0, this makes sense and is consistent. However, for the Date parameters, since 'day' starts with 1 and makes the most sense, then why not start the month and the year with '1' as well? Nope, instead, the creators decided to make the month slightly difficult (and very difficult when we add in how fast developers need to work nowadays) by starting the value at '0'. But, no one in the world uses '0' to represent a month, and if it's an array index then define the parameter as such for ALL parameters in the Date definition. If you're not already confused, then try the year with a starting value of '1' and see this is actually 1901. Why, just because the creators somehow thought that programming would only be useful for years 1900-1999 (or shortcut values as 0-99). Thanks guys. Especially to Java guys who decided to just deprecate this and recommend using more code for date formatting (i.e. SimpleDateFormat).
*By the way, I wouldn't complain if these two programming languages weren't so currently popular and in demand.

My Solution

To avoid this unnecessarily confusing definition and prevent making mistakes within my apps, I would create a Date wrapper object that would allow for easier reading of my code. And consistency. That's [programming language] agnostic.

Tuesday, January 15, 2019

Review: C Programming Language status

The article I read today -
https://insights.dice.com/2019/01/14/state-of-c-programming-language-in-2019/

This was useful to know. Although C is not among the popular languages because other programming languages are more attractive and programmers don't need to worry about low-level coding or resolving performance issues on the application lower layer, C is still useful to understand. Like the author says, it's useful to know for IoT development (or any kind of development related to devices and to robots). Basically, if you're getting into the hardware side of development, then you really need to know C programming language.

Sounds like I too need to brush up on my C understanding! Well, when I get into programming devices or robots. :D

Happy Learning!

Wednesday, November 28, 2018

Which Java - since Java's future is at stake?

Many are still talking about the importance of programming in Java. Since there are many apps and systems still running on Java, the need for Java support is still in demand. Or is it?

With Oracle putting the value of Java on the line (and risking its extinction like Solaris), perhaps I need to consider the other options. Especially with Google and community creating Kotlin (as a solution to replace Java). And especially with Amazon now also addressing this concern with its own solution called Corretto (and OpenJDK).

https://aws.amazon.com/blogs/opensource/amazon-corretto-no-cost-distribution-openjdk-long-term-support/

https://kotlinlang.org/docs/reference/comparison-to-java.html

The above link is a nice short comparison of why to use Kotlin over Java. It seems we, the community of developers, always have to wait for corporate to finally release a version which makes application development easier and product performance better. So, instead of waiting for Java <next version>, I think I'm going to try out one of the solutions in this blog.

Now, if I can only get some time to play with these languages. ;-)

Wednesday, May 3, 2017

Frameworks over Languages?

I recently read this article:
http://www.kdnuggets.com/2017/05/frameworks-offer-data-scientists-programming-languages-lack.html

What a mind opener and so true (to a degree, but a high degree)! Why bother with languages that a person has to learn and do all kinds of stuff, when one can leverage a framework and - viola! - create something rapidly? Ruby-on-Rails is a great example. Perhaps it's why it's one of the most useful RAD frameworks. Of course, there are cases when a person will not want to use a framework (or find one that more-so matches the product development's purpose). For example, if you need to customize a lot instead of following conventions, then Rails is not for you. Spring might be a better match, but that involves switching languages. I haven't researched and played with all the different Ruby frameworks, but perhaps there is one that is more flexible and customizable?

Either way, know the frameworks and don't dig too deep into the languages UNLESS you must use the specific language to accomplish your goal.

Good luck,
G2

Monday, March 13, 2017

Keeping up with Programming Languages

It's always tough to keep up with all the programming languages and to know which one is the best for the year. I use to think certain languages would die, but many still are surviving like Java. I like this article though and agree. Best bet is to securely know the fundamentals of programming and then learn a few well while staying aware of the basics for other programming languages. Thank goodness for the quick tutorials on YouTube (in addition to Google+StackOverflow)!

https://ntguardian.wordpress.com/2017/03/13/on-programming-languages-why-my-dad-went-from-programming-to-driving-a-bus/

Wednesday, July 13, 2016

PHP Array indexes are CaSe-SeNsiTIvE

Devs,

Quick note, PHP array indexes are CaSe-SeNsiTIvE.

I ran into an issue with sending a $_POST to the database to insert a record. I was validating the data in the post array and setting required values if a key was not set properly. However, this gave me a database insert error stating I'm using duplicate field (column) names.

Well, ain't that tricky!

Did a quick search to confirm my assumption about PHP array indexes being case-sensitive.
http://stackoverflow.com/questions/1511230/php-array-are-array-indexes-case-sensitive

Yep, added the check for all cases and database insert worked! Yay!!

I wonder what other languages treat array indexes as case-sensitive? Maybe all programming languages? This would only make sense, no? The value of an index is calculated differently based on char value, right?

To be continued...

Happy Coding,
G2