Blog Archives | CodeGuru https://www.codeguru.com/blog/ Thu, 03 Mar 2022 14:53:23 +0000 en-US hourly 1 https://wordpress.org/?v=6.3.2 Programming Languages for Kids (and Grown Ups)! https://www.codeguru.com/blog/programming-languages-for-kids-and-grown-ups/ Wed, 31 Jan 2018 08:15:00 +0000 https://www.codeguru.com/uncategorized/programming-languages-for-kids-and-grown-ups/ Programming Languages for Kids (and Grown Ups)! Codeguru caters to programmers. Most of the programmers on Codeguru are adults or college students working with companies or writing programs for their own use. Most don’t likely know what regulations such as COPPA are. If they do know what COPPA is, it’s likely because they are making […]

The post Programming Languages for Kids (and Grown Ups)! appeared first on CodeGuru.

]]>
Kid ProgrammingProgramming Languages for Kids (and Grown Ups)!

Codeguru caters to programmers. Most of the programmers on Codeguru are adults or college students working with companies or writing programs for their own use. Most don’t likely know what regulations such as COPPA are. If they do know what COPPA is, it’s likely because they are making sure their apps and sites are COPPA compliant, not because they are running into COPPA gates on sites.

The world is changing. One area of change is that many schools are adding more and more classes around programming concepts. The local high school in my town is adding advanced programming classes as well as a cyber security class for the students. The state legislation is considering pushing programming into the lower classes at the public schools as a mandated requirement, possibly all the way down into elementary schools.

Although pushing elementary kids to program might seem crazy, the reality is that many elementary teachers are already teaching programming by using a variety of games, customized kits (such as Spheros and Osmos), and simplified or customized programming languages. The reality is that there could be kids coming out of high school with years of programming experience.

In the following slides, I present some of the programming languages and tools that are available for kids (and grownups). Many of these are simplified versions that focus as much on the concepts of program structure as on the actual building of applications. Some can be used to create full applications; others are simply runtime environments. Each provides kids with a platform or tool to get started in programming and to learn the concepts.

Don’t look for C, C++, Java, Ruby, Python, or the common languages that you see developers using every day. Kids certainly can use these, but they are not the focus of these slides. Rather, what you will see are languages and tools aimed at kids. Even though they are aimed at kids, you might find that some are a lot of fun to use!

ScratchScratch Programming for Kids

Scratch is one of the most popular programming tools for kids. Scratch can be used to create stories, projects, and programs that can be shared with a community of others. There are millions of projects already online, including games, animations, and interactive stories. Coding is primarily done by dragging and dropping blocks together to build a storyboard as shown in the slide.

Scratch was developed by MIT Media Lab and is free to use. Version 2.0 of Scratch is generally used through a modern Web browser, including Firefox, Chrome, Safari, and Edge. Scratch is a visual, scripting language. One unique feature of Scratch is that it is available in over 40 languages.

Link: https://scratch.mit.edu/

AliceAlice Programming for Kids

Alice also uses a drag and drop interface to program. With Alice, you can build interactive elements into a game, interactive story, or other application. Like Scratch, Alice is also used in classrooms and schools.


The language is named after Alice in the Lewis Carroll book, Alice’s Adventures in Wonderland. Like the books, the emphasis is on communicating complex ideas in simple, fun ways. As with the book, the programming language is available for free in the public domain.


Alice has multiple versions, with the most recent (as of the writing of this slideshow) being Alice 3. The previous version, Alice 2, is considered simpler. The Alice site provides resources for using either version, including exercises, lessons, how-tos, and even textbooks.


One of the unique features of Alice, especially Alice 3, is that it is positioned to be a stepping stone towards Java development. Additionally, Alice also is designed to target 3D solutions as well as 2D. Alice can be used on Windows, Macs, and Linux systems; however, there is a minimum configuration due to the level of graphics and features provided.

Link: http://www.alice.org/

BlocklyBlockly Library for Programming for Kids

Blockly, also presented at Block.ly, is a JavaScript-based library for visual programming. Like other kid-based programming languages, Blockly uses visual blocks to create programs. One difference is that Blockly outputs actual textual code in a variety of languages, including JavaScript, Python, PHP, Lua, and Dart. Another difference is that Blockly is more of a library and tools. While these can be injected into web pages for use, the hurdle to starting your first program from the core libraries is going to be higher than some of the other languages and tools.


Blockly is a Google project, but is used in a variety of projects and platforms, including Microsoft MakeCode, App Inventor, CODE, and even with the Ozobots. As mentioned, it can be used in browsers, including Chrome, Firefox, Safari, Opera, and Internet Explorer. Because it is script-based, it can run on browsers and other clients without the need of a server.


One unique feature of Blockly is that it can run natively on iOS. It is also tightly integrated with Android for building apps. It is also worth noting that Scratch, mentioned in a previous slide, is built on Blockly technology.

Link: https://developers.google.com/blockly/

StencylStencyl Programming for Kids

Stencyl is an easy-to-use programming tool and IDE that can be used for game development. Stencyl can be used to target iOS, Android, Windows, Mac, Linux, and Flash. HTML5 was experimental at the time this slideshow was being written. Like the previous kid programming languages, Stencyl uses the drag-and-drop block format to coding.

Although you can do drag-and-drop, block-based programming, Stencyl allows for writing code as well. Stencyl uses Haxe, which is similar to ActionScript. It also includes an image editor, Pencyl.

Stencyl is free if you publish to the Web. If you want to target the desktop, iOS, Android, or other platforms, you’ll need to purchase a subscription. The subscription is sold on an annual basis.

Link: http://www.stencyl.com/

KudoKodu Programming for Kids

Kudo Game Lab started as a way for kids to learn to program, but evolved to be a way for kids to create games. Kudo provides a visual development environment to produce 3D games, interactive storyboards, and more.

Kudo is available for Windows XP and later. Additionally, Kudo programs can be played on an Xbox 360. One unique feature of the Kudo environment on Windows is that games can be created and updated using just a game controller. Although Kudo is easy to use, it is one of the older tools on the market, so support and updates might not happen at the same rate as some of the others.

Even though many of the kid programming IDEs and tools shown were block based, Kudo is based primarily on icons, rules, conditions, and actions. Kudo provides programming concepts with digital art.

One unique thing about Kudo is that it can also be used with micro:bits (although only as a legacy language). Micro:bit is covered in the next slide!

Link: https://www.kodugamelab.com/

Download Information: https://www.microsoft.com/en-us/download/details.aspx?id=10056

Micro:bitMicro:bit Programming for Kids

BBC micro:bit is actually not a programming language or development environment. It is a small, codable hardware device. Mentioned in the previous slide, Kudo is more of a legacy language for working with micro:bit. JavaScript Block is the current approach to coding for these devices, and can be accomplished with Micro:bit’s JavaScript Blocks Editor. For kids who are a bit more advanced, Micro:bit also has a Python editor that can be used.

Micro:bit can be programmed from browsers by using the tools mentioned, as well as programmed with JavaScript, Scratch, and other languages without having to buy additional software. The hardware includes buttons, an accelerometer, a compass, programmable LEDs, input and output rings, and much more.

Because micro:bit is a hardware device, you can consider it an introduction to IoT for Kids! One key feature of the hardware is that it can receive code wirelessly via Bluetooth from Android and iOS apps!

Link: http://microbit.org/
Link: https://makecode.microbit.org/

LogoLogo and Turtle Logo Programming for Kids

Logo is one of the oldest programming languages that has tended to be used by kids. The Logo language centered around writing code to do graphics as well as to move an object (a small robot called a turtle) around a screen.

Logo is like C and C++ in that there are multiple adaptations of the language. Over the years, nearly 200 versions of Logo have been released, as well as programs that refer to themselves as “turtle-graphics.” Some of the more popular ones are Dr. Logo produced by Digital Research and UCBLogo.

Even though there are a lot of implementations, if you want a quick look at working with Logo, you can use an online interpreter to type in logo commands and then run them. One such interpreter can be found at http://www.calormen.com/jslogo/. This interpreter is what is shown in the slide. If you want to re-create the star and block, the code for the example is:

to randomcolor
  setcolor pick [red blue green violet orange ]
  End
to star
  repeat 5 [fd 100 rt 144]
End
clearscreen
randomcolor
star
randomcolor
rt 90 fd 100 lt 90 fd 200 lt 90 fd 200 lt 90 fd 200 lt 90 fd 100

Link: http://www.calormen.com/jslogo/

Link: https://github.com/jasonsikes/QLogo

MindcraftMindcraft Programming for Kids

Mindcraft is a game, but it is also a platform that can be used to teach kids to code. Microsoft MakeCode for Mindcraft is a programming editor for coding that is available at https://minecraft.makecode.com/. The editor presented in the slide should look like what you’ve seen in previous slides. This is because the editor uses a Scratch Block user interface, which is based on Blockly and Scratch.

What is unique about this implementation, beyond the focus on using Mindcraft as a platform, is that there has been a focus on making programming work by using a touch screen. Because the MakeCode editor is targeting Mindcraft, there are block elements from the game that can be used in programming as well as many other elements and features form the game. In many ways, MakeCode for Mindcraft uses the gaming aspects of Mindcraft to help engage kids into programming!

Link: https://minecraft.makecode.com/setup

MindStormLego Mindstorm for Kids

Where micro:bit was a kid programming tool that also can be seen as an introduction into IoT for kids as well, Lego Mindstorm has a programming interface that is great for kids to learn coding concepts while at the same time also learning robotics.

Lego Mindstorm can be used to teach programming concepts by having kids connect programming icons together in the EV3 programming tool. These icons can be used to control the various robotic components within the Lego Mindstorm sets. The Lego Mindstorm EV3 software can be installed on Microsoft Windows and Mac OS X. There is also a mobile app for iOS and Android that can be used as well.

Because EV3 programming is used to control Lego Mindstorm gadgets, there is a cost barrier to using it to learn programming concepts.

Link: https://www.lego.com/en-us/mindstorms/downloads/download-software

Other Programming Languages for KidsOther Programming Languages for Kids

I’ve covered a few of the more popular programming languages and tools for kids. There are many other languages and tools that are also popular that are aimed more at kids than grownups. These include:

  • HopScotch (iOS)
  • Hackety Hack
  • Kodable (iOS)
  • Lego Mindstorm
  • RoboMind / ROBO
  • Swift Playground (Swift)
  • Tynker
  • Waterbear
  • Twine
  • Sonic Pi
  • GameMaker
  • StarLogo TNG
  • PyGame

As mentioned before, because of the power of programming, there are tools that can be used by school districts that mandate programming at the lower grade levels. As this happens, teachers will find plenty of options for languages and tools to use within the classroom!

COPPA is the Child Online Privacy and Protection Act, which impacts how you can interact with kids under the age of 13. It will be interesting to see how applications written by kids under the age of 13 who write online applications apply COPPA legislation to their own applications!

The post Programming Languages for Kids (and Grown Ups)! appeared first on CodeGuru.

]]>
List of New Features in JDK 9 and Java SE 9 https://www.codeguru.com/blog/list-of-new-features-in-jdk-9-and-java-se-9/ Fri, 22 Sep 2017 14:21:00 +0000 https://www.codeguru.com/uncategorized/list-of-new-features-in-jdk-9-and-java-se-9/ Yesterday Oracle announced the general availability of the Java SE 9 Platform and the JDK 9. While most people on Codeguru are focused on C#, C++, and the .NET languages, there are those doing Java as well. Regardless of your coding language, it is always interesting to see what is new, even if it is […]

The post List of New Features in JDK 9 and Java SE 9 appeared first on CodeGuru.

]]>
JDK 9 UpdateYesterday Oracle announced the general availability of the Java SE 9 Platform and the JDK 9. While most people on Codeguru are focused on C#, C++, and the .NET languages, there are those doing Java as well. Regardless of your coding language, it is always interesting to see what is new, even if it is in a competing language.

With JDK 9, Oracle announced over 150 features that were new. The included the following list of 91 items. While not all of these are features, it is still a big list of changes:

  • Process API Updates
  • HTTP 2 Client
  • Improve Contended Locking
  • Unified JVM Logging
  • Compiler Control
  • Variable Handles
  • Segmented Code Cache
  • Smart Java Compilation, Phase Two
  • The Modular JDK
  • Modular Source Code
  • Elide Deprecation Warnings on Import Statements
  • Resolve Lint and Doclint Warnings
  • Milling Project Coin
  • Remove GC Combinations Deprecated in JDK 8
  • Tiered Attribution for javac
  • Process Import Statements Correctly
  • Annotations Pipeline 2.0
  • Datagram Transport Layer Security (DTLS)
  • Modular Run-Time Images
  • Simplified Doclet API
  • jshell: The Java Shell (Read-Eval-Print Loop)
  • New Version-String Scheme
  • HTML5 Javadoc
  • Javadoc Search
  • UTF-8 Property Files
  • Unicode 7.0
  • Add More Diagnostic Commands
  • Create PKCS12 Keystores by Default
  • Remove Launch-Time JRE Version Selection
  • Improve Secure Application Performance
  • Generate Run-Time Compiler Tests Automatically
  • Test Class-File Attributes Generated by javac
  • Parser API for Nashorn
  • Linux/AArch64 Port
  • Multi-Release JAR Files
  • Remove the JVM TI hprof Agent
  • Remove the jhat Tool
  • Java-Level JVM Compiler Interface
  • TLS Application-Layer Protocol Negotiation Extension
  • Validate JVM Command-Line Flag Arguments
  • Leverage CPU Instructions for GHASH and RSA
  • Compile for Older Platform Versions
  • Make G1 the Default Garbage Collector
  • OCSP Stapling for TLS
  • Store Interned Strings in CDS Archives
  • Multi-Resolution Images
  • Use CLDR Locale Data by Default
  • Prepare JavaFX UI Controls & CSS APIs for Modularization
  • Compact Strings
  • Merge Selected Xerces 2.11.0 Updates into JAXP
  • BeanInfo Annotations
  • Update JavaFX/Media to Newer Version of GStreamer
  • HarfBuzz Font-Layout Engine
  • Stack-Walking API
  • Encapsulate Most Internal APIs
  • Module System
  • TIFF Image I/O
  • HiDPI Graphics on Windows and Linux
  • Platform Logging API and Service
  • Marlin Graphics Renderer
  • More Concurrency Updates
  • Unicode 8.0
  • XML Catalogs
  • Convenience Factory Methods for Collections
  • Reserved Stack Areas for Critical Sections
  • Unified GC Logging
  • Platform-Specific Desktop Features
  • DRBG-Based SecureRandom Implementations
  • Enhanced Method Handles
  • Modular Java Application Packaging
  • Dynamic Linking of Language-Defined Object Models
  • Enhanced Deprecation
  • Additional Tests for Humongous Objects in G1
  • Improve Test-Failure Troubleshooting
  • Indify String Concatenation
  • HotSpot C++ Unit-Test Framework
  • jlink: The Java Linker
  • Enable GTK 3 on Linux
  • New HotSpot Build System
  • Spin-Wait Hints
  • SHA-3 Hash Algorithms
  • Disable SHA-1 Certificates
  • Deprecate the Applet API
  • Filter Incoming Serialization Data
  • Deprecate the Concurrent Mark Sweep (CMS) Garbage Collector
  • Implement Selected ECMAScript 6 Features in Nashorn
  • Linux/s390x Port
  • Ahead-of-Time Compilation
  • Unified arm32/arm64 Port
  • Remove Demos and Samples
  • Reorganize Documentation

ining feature” of Java SE 9. Among other things, this module allows developers to bundle just the parts of the JDK that they need in their applications when deploying.

The JDK 9 is available now from the Oracle site. You can download it form the JDK 9 General Release page .

# # #

The post List of New Features in JDK 9 and Java SE 9 appeared first on CodeGuru.

]]>
Developer Feedback on Net Neutrality https://www.codeguru.com/blog/developer-feedback-on-net-neutrality/ Fri, 18 Aug 2017 08:23:00 +0000 https://www.codeguru.com/uncategorized/developer-feedback-on-net-neutrality/ We ran a quick poll to ask members of our community about Net Neutrality. Although there were those who expected landslide results, that was not the case. The question was posed as: When it comes to Net Neutrality: Don’t know about it For it Against it Don’t care about it In simple terms, net neutrality […]

The post Developer Feedback on Net Neutrality appeared first on CodeGuru.

]]>
We ran a quick poll to ask members of our community about Net Neutrality. Although there were those who expected landslide results, that was not the case. The question was posed as: When it comes to Net Neutrality:

  • Don’t know about it
  • For it
  • Against it
  • Don’t care about it

In simple terms, net neutrality is seen as a means of preventing Internet service providers from charging different fees for bandwidth depending on whose sites you visit. For example, if an ISP wanted to offer their own video streaming services, they could decrease the bandwidth provided when their customers use third-party streaming services and increase the bandwidth for their own. This would give their video service much better performance, and thus an advantage over their competitors. More so, the service provider could offer to improve the performance of the third-party service by charging their customers a fee to increase the bandwidth. Even though some say this is simply how capitalism and business work, others say that, because of limited options, it would force people to pay what seems like extortion fees to get equal services.

The thought is that, among other things, net neutrality rules prevent service providers from being able to extort their members or to throttle their competitors unfairly. It is believed by many that the removal of the net neutrality rules could hurt consumers as well as Internet businesses such as Netflix. For those who believe service providers will do what is right for their customers, consider the examples that have already happened. For example, Verizon has already been accused of throttling NetFlix. Despite the fact this might have been an “optimization test,” the result was that users were capped.

Blocking, throttling, and the use of paid prioritization are the three areas that net neutrality works to prevent. In addition to Verizon being accused of capping, Comcast has been accused of blocking. In one case, it was questioned whether Comcast blocking HBO Go on Sony consoles would be a violation of net neutrality.

So how did our audience vote? The results were:

Vote on Net Neutrality

As expected, the “for it” answer did take the majority of the votes; however, % of the votes were against it.

Net neutrality is not a simple topic and many people are polarized by the topic. The FCC was expected to make a decision this week on whether the rules should be overturned. Due to the vast number of comments regarding the topic, the FCC moved the date out two weeks (to August 30th) to allow more time to review the feedback. In the FCC filing, they indicate that of the millions of comments on the topic, they believe that over 7 million were fraudulent. I believe that the decisions around net neutrality could impact Internet services for most people. If the net neutrality rules go away, the popular belief is that there will be a negative impact for many consumers from higher fees, caps, or throttling.

As to our communities, here are a few comments they had on the topic:

  • ISPs should limit themselves to providing us Internet access; we decide where to go and what to do with it.
  • This is a stupid question. The only people who wouldn’t be for this either don’t know what it is or stand to get rich from moving away from it.
  • We shouldn’t be giving corporate giants the ability to throttle everyone else’s exposure if they can’t afford it on such a huge scale.
  • “net neutrality” is a misnomer.
  • I don’t need censorship. Give me information and not a blind eye to the world around me.
  • It’s ridiculous we are even having this debate. But people’s greed, I guess, is a tough adversary.
  • Net neutrality assumes that man is basically good – WRONG.
  • The backbone of the Internet is vital to the public good. It should be part of the commons, not privatized for profit.
  • F*** anyone who’s against saving net neutrality.
  • Net neutrality is just a covert attempt by the government to control the Internet.
  • Anyone who doesn’t want to spread misinformation and then make money from should rightly be in favor of net neutrality. But, many people blindly follow thieves and are as such often found as against their own interests.
  • Without net neutrality, private sites and projects could lose the ability to compete with incumbents.
  • Big brother again
  • W/o net neutrality, any greedy and morally onerous ISP has free reign to force its subscribers to use its own services as opposed to the services of their competitors.
  • For it, but I definitely think some content needs to be blocked — like child pornography. Period.
  • Net neutrality is incredibly important for continued freedom of expression, protection of freedom of speech, and open access to a free market.
  • Can you speak Chinese?
  • Okay, I’m not sure how that last comment fits with the topic, but it was one of over a hundred related to the single poll question.

    If you are developing or using Web sites, net neutrality is a topic worth watching. Although it won’t necessarily directly impact your coding, it could impact your usage of the Web as well as how your solutions perform in the future. It will be interesting to see what happens after August 30th in the US and then see how that impacts other countries as well.

The post Developer Feedback on Net Neutrality appeared first on CodeGuru.

]]>
Reverse Engineering – The Books https://www.codeguru.com/blog/reverse-engineering-the-books/ Thu, 03 Aug 2017 13:00:00 +0000 https://www.codeguru.com/uncategorized/reverse-engineering-the-books/ I’m a book person. I like books, and I read paper books. That’s not to say I don’t also read electronic versions, but when it comes to computer and tech books, paper books often work better for me. My preference for paper tech books is likely because I wrote a few and spent several years […]

The post Reverse Engineering – The Books appeared first on CodeGuru.

]]>
I’m a book person. I like books, and I read paper books. That’s not to say I don’t also read electronic versions, but when it comes to computer and tech books, paper books often work better for me. My preference for paper tech books is likely because I wrote a few and spent several years working for a tech publisher producing hundreds of paper volumes!

I would be curious to hear what books you are currently reading and whether it is one you recommend. We’ll start a discussion in the Codeguru forum on this topic so you can share.

What prompted this blog post is that I am clearing books off my desk. These books fall much more into the arena that might interest you as a reader of Codeguru. There are two books I’m ready to move to my shelves. These are Practical Reverse Engineering by Dang, Gazet, and Bachaalany and Reversing: Secrets of Reverse Engineering by Eladad Eilam. Both books focus on the idea that, if you understand how something works, you’ll be better able to protect and secure it.

Reversing covers a wider range of topics, including a foundation of reverse engineering. There is coverage of low-level software, Windows, and its fundamentals, tools that can be used for reverse engineering, information on file format deciphering, and more. There are cracking chapters that include piracy and copy protection information, anti-reversing techniques, information on methods for breaking protection, and more. There is also a chapter on reversing .NET as well as decompilation.

Practical Reverse Engineering is a little more systematic in its coverage. It provides information on various architectures, including x86, x64, and ARM. It also tackles the Windows Kernel, debugging and automation, as well as obfuscation.

Although both books are worth checking out if you are looking into reverse engineering, I tend to lean towards the Reversing book if you only want to choose one!

While those are the books I’m removing from my desk, I’m currently reading a fiction series of books that I borrowed from my young daughters The series is by James Dashner, who also wrote the Maze Runner series. The first book was The Eye of Minds, which is a cyber-adventure. I just finished the second book, The Rule of Thought, and will be grabbing the third book in the trilogy soon. James Dashner takes the reader into the world of virtual reality mystery. So far, it has been an enjoyable read that has pushed my thinking into what is real!

So the question remains – what book are you currently reading? Jump over to the forum and let us know! Also let us know if you are reading a paper copy or in an electronic form. Let’s continue the discussion over there!

The post Reverse Engineering – The Books appeared first on CodeGuru.

]]>
SQL Server 2017 RC1 Available https://www.codeguru.com/blog/sql-server-2017-rc1-available/ Wed, 19 Jul 2017 20:10:00 +0000 https://www.codeguru.com/uncategorized/sql-server-2017-rc1-available/ The launch of a release candidate is generally an indicator that a product is complete and the final bugs are being worked out. This week Microsoft made available SQL Server 2017 RC1, which can be downloaded now. You can find SQL Server 2017 downloads for Linux, macOS, Windows, Docker and Azure on the Microsoft site […]

The post SQL Server 2017 RC1 Available appeared first on CodeGuru.

]]>
The launch of a release candidate is generally an indicator that a product is complete and the final bugs are being worked out. This week Microsoft made available SQL Server 2017 RC1, which can be downloaded now. You can find SQL Server 2017 downloads for Linux, macOS, Windows, Docker and Azure on the Microsoft site at:

https://www.microsoft.com/en-us/sql-server/sql-server-2017#resources

Some of the features added to SQL Server 2017 include support for Linux at higher levels, graph data processing, adaptive query processing, in-database analytics using Python or R, active Directory Authentication support, enhancements to Machine Learning Services , Dynamic Management Views in SQL Server Analysis Services (SSAS), Always on for SQL Server Integration Services (SSIS) on Windows Server, and more.

One of the goals for the new product was to have SQL Server 2017 run on any public or private cloud infrastructure. With the support for containers, SQL Server 2017 is able to better support Continuous Integration/Continuous Deployment (CI/CD) scenarios. This all fits within the objective of positioning SQL Server to work for DevOps.

If you are working in a DevOp environment with SQL Server, then there are a number of tools you’ll be able to tap into from Microsoft. This includes the Visual Studio SQL Server Data Tools for doing the CI/CD as well as using the Redgate Data Tools that Microsoft had aligned with recently. You can also use the msql-scripter to generate scripts for database objects in SQL Server as well as in Azure data stores. The sqlcmd is now available for Linux, Windows, and the macOS so you can enter commands and such at the command prompt. Finally, bcp is also available on Linux, Windows and the macOS to copy files in specific formats.

The following is a Channel9 video showing some of the SQL Server Data Tools that you’ll be able to use in the DevOps pipeline:

The post SQL Server 2017 RC1 Available appeared first on CodeGuru.

]]>
Taking a Database to World-Scale – Microsoft Presents Azure Cosmo DB https://www.codeguru.com/blog/taking-a-database-to-world-scale-microsoft-presents-azure-cosmo-db/ Wed, 10 May 2017 15:40:00 +0000 https://www.codeguru.com/uncategorized/taking-a-database-to-world-scale-microsoft-presents-azure-cosmo-db/ Microsoft announced the Cosmos Database today at Microsoft Build. This is a new database built from the ground up to take support what is deemed as “planet scale” applications. The focus was to build a database that could provide fast responses to users no matter where they are located on the planet. With the increase […]

The post Taking a Database to World-Scale – Microsoft Presents Azure Cosmo DB appeared first on CodeGuru.

]]>
Microsoft announced the Cosmos Database today at Microsoft Build. This is a new database built from the ground up to take support what is deemed as “planet scale” applications. The focus was to build a database that could provide fast responses to users no matter where they are located on the planet. With the increase in IoT and AI solutions, the intensity to which data is being used is getting greater. Along with that, the expectations of a database are also increasing.

Microsoft stated that Cosmos DB is a “globally distributed, multimodal database service to deliver horizontal scale with guaranteed up-time, throughput, consistency and millisecond latency at the 99th percentile.”

The service provides schema-agnostic database services with support for NoSQL. With Cosmos Db, you will be able to get an image of your database across the entire world. The service will also provide the support to provide consistency when scaling your data across, even if it is across 34 regions on the planet.

Cosmos DB provides five well defined consistency models: Strong, Bounded Stateless, Session, Consistent Prefix, and Eventual. This lets you determine how you want to balance between high availability, performance, and the consistency of your data.

Azure Cosmos DB has been released for General Availability today.  

Cosmo DB

The post Taking a Database to World-Scale – Microsoft Presents Azure Cosmo DB appeared first on CodeGuru.

]]>
Where is Microsoft in their Mobile-First, Cloud-First World? https://www.codeguru.com/blog/where-is-microsoft-in-their-mobile-first-cloud-first-world/ Wed, 10 May 2017 15:00:00 +0000 https://www.codeguru.com/uncategorized/where-is-microsoft-in-their-mobile-first-cloud-first-world/ Microsoft has continued to promote a Mobile-First, Cloud-First game plan. This includes changes that have impacted what they do across the board. Today at the Microsoft Build conference in Seattle, Microsoft mentioned some stats around where they stand with some of their Cloud and mobile initiatives. Microsoft Windows 10 Monthly Active Users The core to […]

The post Where is Microsoft in their Mobile-First, Cloud-First World? appeared first on CodeGuru.

]]>
Microsoft has continued to promote a Mobile-First, Cloud-First game plan. This includes changes that have impacted what they do across the board. Today at the Microsoft Build conference in Seattle, Microsoft mentioned some stats around where they stand with some of their Cloud and mobile initiatives.

Microsoft Windows 10 Monthly Active Users

The core to Microsoft’s world is their core operating system, Windows 10. Windows 10 has reached 500 million monthly active users

Commercial Office 365 Monthly Active Users

Microsoft Office 365 now boasts 100 million monthly commercial users. With Office being a core productivity platform for many enterprise users, Microsoft is providing additional opportunities for developers around Office. This includes an announcement that Microsoft Team, which they talked about at an education conference last week, will be accessible to developers to add extensions to do things such as add notifications, extensions, and actionable messages. Developers will also be able to tap into the data and intelligence within Microsoft using the new Microsoft Graph APIs. Finally, Microsoft is providing a way for production apps on Azure to now be exposed to 100s of millions of active office users for ISVs.

Cortana Monthly Active Users

Cortana 141 million active users. While this is a large number, it includes the people using any type of interaction with Cortana including voice.

Organizations in Azure Active Directory12

Azure Active Directory continues to grow within organizations. This has increased to 12 million organizations that are now using Azure Active Directory.

Fortune 500 Companies using Microsoft Cloud

While Microsoft Cloud might not be the leader, it is worth noting that Fortune 500 companies are using Microsoft Cloud. The percentage of Fortune 500 companies using Microsoft Cloud is now over 90%.

Cognitive Services for Developers

A big buzz are is Cognitive Services. With the growth of data and intelligence, cognitive services can now add a great deal to what developers can do. Microsoft claimed one of the broadest offerings in cognitive services with 29 different services for developers. These services that developers can tap into include vision, speech, language , search, and more. Some of the new services added are Bing Custom Search, Custom Decision Service, Video Indexer, Presentation Translator, and Custom Vision Service.

Adding It All Together

These number just scratch the surface of what is happening at Microsoft. Look for coverage of some of the other news coming out of Microsoft Build.

The post Where is Microsoft in their Mobile-First, Cloud-First World? appeared first on CodeGuru.

]]>
Google Assistant SDK : Now for Raspberry Pi or Your Own Device https://www.codeguru.com/blog/google-assistant-sdk-now-for-raspberry-pi-or-your-own-device/ Fri, 05 May 2017 19:03:00 +0000 https://www.codeguru.com/uncategorized/google-assistant-sdk-now-for-raspberry-pi-or-your-own-device/ Google is allowing you to build in the Google Assistant into any of the projects you are developing. Using the Google Assistant SDK, you can now extend what you are doing in IoT projects such as toys or other smart devices as well as add the functionality to your applications. The Google Assistant functionality can […]

The post Google Assistant SDK : Now for Raspberry Pi or Your Own Device appeared first on CodeGuru.

]]>
Google is allowing you to build in the Google Assistant into any of the projects you are developing. Using the Google Assistant SDK, you can now extend what you are doing in IoT projects such as toys or other smart devices as well as add the functionality to your applications.

The Google Assistant functionality can be used as is, or you can extend it with your own actions. With the SDK, you’ll be able to tap into features such as adding voice control and natural language processing. By using the assistant code, you’ll be able to obtain audio (spoken responses) as well as text translations of voice commands. This means you will be able to send captured voice input from your solution that you can then send to the API to process.

Specifically, you will be able to have interactions with users by using Google Conversation Actions. These actions are invoked by the Google Assistant. In the actions, you’ll be able to build these actions to execute the code you want to occur. Using the API and Actions, you’ll be able to define the triggers for starting an action, the dialogues that can occur, and the execution (or fulfillment) that occurs when the trigger happens. This is all defined within the Conversation API.

Google Assistant SDK

You can now develop Google Assistant into your solutions on a Raspberry Pi 3 as well as on some of the other Linux systems. Google has included a gRPC API, which is a Python open source client. You can find sample code on GitHub at https://github.com/googlesamples/assistant-sdk-python. The example code can help get you started. It provides code to tap into the Google Assistant Actions, including doing the necessary authentication.

The API is a developer preview (Alpha) at this time and is free to use in the development process. It does have a limit to the number of daily request that can be made. Additionally, this release appears to be focused primarily on Google Assistant Actions. Other features, such as Google Assistant Embedded are not available at this time.

The following video from Google is a bit of an ad, but it also does a good job of hitting some of the highlights of what can be done with the SDK.

The post Google Assistant SDK : Now for Raspberry Pi or Your Own Device appeared first on CodeGuru.

]]>
Microsoft Announces Windows 10 S: The Soul of Windows https://www.codeguru.com/blog/microsoft-announces-windows-10-s-the-soul-of-windows/ Tue, 02 May 2017 17:54:00 +0000 https://www.codeguru.com/uncategorized/microsoft-announces-windows-10-s-the-soul-of-windows/ Microsoft announced Windows 10 S today. This version runs on all of the existing devices that support Windows 10. While Windows 10 S is primarily aimed at students, it seems best positioned to go against devices running the Chrome OS.  For Windows 10 S, the default desktop image has been streamlined with the promise of […]

The post Microsoft Announces Windows 10 S: The Soul of Windows appeared first on CodeGuru.

]]>
Microsoft announced Windows 10 S today. This version runs on all of the existing devices that support Windows 10. While Windows 10 S is primarily aimed at students, it seems best positioned to go against devices running the Chrome OS. 

For Windows 10 S, the default desktop image has been streamlined with the promise of running smoothly even after time. For students, this means that the system should be operating quickly after a few years of use, just as it did on the first day it was used.

One thing that will help with this is that applications are downloaded from the Windows Store and ran in more of a sandbox environment so that each application shouldn’t impact the performance of other apps running on the device, nor should they clutter up the system itself. Additionally, by requiring applications to come from the Windows Store, there is a higher level of integrity and security that can be expected. Unlike the dreaded Windows RT of a few years ago, if you want to venture outside of using the Windows Store, that is possible by upgrading to Windows 10 Pro. Microsoft also mentioned that there would be a way in a classroom setting for a teacher to be able to install such apps on student devices as well.

Windows 10 S is expected to be used by students. As such, applications such as the Office 365 Suite will be available in the Windows Store soon. The Windows 10 S will also run any browser inside the Windows Store; however, the focus will be on Microsoft Edge. Microsoft Edge will include annotations and other features that will allow students to highlight, annotate, and share items from the web.

Microsoft Edge Annotations

Figure 1: Microsoft Edge Annotations

Microsoft Windows 10 S is setup for a student/school environment. As such, if a student tries to download an application that isn’t in the Windows store, Windows 10 S will give a security warning. Teachers will have the ability to switch a device from Windows 10 S to Windows 10 Pro in order to download and install such application.

Warning if installing apps outside of App Store

Figure 2: Warning if installing apps outside of App Store

In classrooms, it is not uncommon to have carts with numerous shared computers on them. In many classrooms, student simply grab a device to use. Students will log into the device and have it boot to their usage. Because class needs to often start quickly, the delay to start a devices can impact the classroom. With Windows 10 S the login time can be around 15 seconds the first time a machine is used and often can be less than 5 on subsequent logins throughout the day. By comparison, on Windows 10 Pro, initial login can be 30 seconds.

One area where schools spend a lot of time is in the initial setup and configuration of computers each year. For configuring Windows 10 S computers for the classroom, a wizard can be ran to configure a system for the setup that is wanted. The results from that wizard can then be put onto a USB key that will be used to configure each of the individual computers after that one. Using the USB Key, it takes about 15 seconds to start the configuration on each computer. One the configuration is launched, the key can then be used on the next computer.  The end result is that a school can reconfigure a large number of computers quickly. 

Configuring hundreds of devices

Figure 3: Configuring hundreds of devices with a setup has been streamlined to take seconds each

To compete with the Chromebook market, a number of vendors such as Acer, ASUS, Dell, Fujistu, HP, Samsung,  and Toshiba will be offering devices starting at $189. These devices will be available this year along with higher-end solutions such as the Surface Laptop that Microsoft also announced. The Surface Laptop will start at $999 and be available round June 15th.

Along with Windows 10 S, Microsoft indicated that a free subscription to Minecraft Education Edition would be included on Windows 10 educational PCs along with Microsoft Office 365 for Education with Microsoft Teams.

# # #

The post Microsoft Announces Windows 10 S: The Soul of Windows appeared first on CodeGuru.

]]>
C++ Exception Handling: How to Handle Exceptions in C++ https://www.codeguru.com/blog/c-exception-handling-how-to-handle-exceptions-in-c/ Fri, 24 Mar 2017 07:15:00 +0000 https://www.codeguru.com/uncategorized/c-exception-handling-how-to-handle-exceptions-in-c/ An exception refers to an instance that does not conform to a rule or generalization. It is an indication of a problem that may occur during program execution. The mechanism of exception handling provides a way to transfer control and information from the point of its occurrence during execution to the point where a handler […]

The post C++ Exception Handling: How to Handle Exceptions in C++ appeared first on CodeGuru.

]]>
An exception refers to an instance that does not conform to a rule or generalization. It is an indication of a problem that may occur during program execution. The mechanism of exception handling provides a way to transfer control and information from the point of its occurrence during execution to the point where a handler routine is written. The handler routine gives the programmer a window of opportunity to succumb to a graceful termination or to deal with it in an appropriate manner. This article gives a basic idea on the implementation of exception handling mechanism in C++.

Overview

A program begins by performing a certain task. If the code to perform the specific task runs smoothly, the next task is performed, and so on until the program completes. Now, if there is any error in the course of its execution, the code falls back to an error handling routine. The error processing logic mingles with program logic and hops between them. Although this form of intermixing is fine, it makes the code difficult to read, maintain, and debug, even for a moderately sized program.

Note that the provision of the error handling mechanism in C is very primitive. There is no direct support from the language itself. Therefore, what we do here is accesses a low-level form of return values of functions. Conventionally, if a negative value or NULL is returned by a function, it indicates an error. Sometimes, a global variable called errno is set as an error indicator during function calls. The header file error.h defines many such error codes.

Using exceptions for error handling brings clarity and makes the code simpler by decoupling the exception routine from the program logic. We can deal with them separately. This brings immense flexibility; apart from this, we can decide to handle exceptions of our choice, group them into related types, or completely ignore them at our discretion.

Applying Exception Handling in C++

C++ exceptions are encompassed within a try…catch block. The try block encloses the code where an exception may occur. It is defined by the keyword try, followed by braces. If an exception occurs, it is processed by the catch handler that catches and handles the exception. The catch portion is also a keyword followed by braces. Every try block is accompanied by at least one catch handler that immediately follows it. There may be more than one catch handler associated with one try block. In such a case, when an exception occurs, the appropriate catch handler executes one whose type matches with the type of exception that occurred. The matching is done on the basis of the exception that is thrown or according to whose base class it inherits.

An example to illustrate the basic idea is as follows:

#ifndef DIVISIONBYZEROEXCEPTION_H_
#define DIVISIONBYZEROEXCEPTION_H_

#include <stdexcept>
using namespace std;

class DivisionByZeroException :public runtime_error{
public:
   DivisionByZeroException():runtime_error
      ("divide by zero exception occurred"){};
};

#endif /* DIVISIONBYZEROEXCEPTION_H_ */


#include <iostream>
#include "DivisionByZeroException.h"
using namespace std;

double div(int num, int denom) {
   if (denom == 0)
      throw DivisionByZeroException();
   return static_cast<double>(num) / denom;
}

int main() {

   int n1, n2;
   double result;
   cout << "Enter two number: ";
   cin >> n1 >> n2;
   try {
      cout << "The result is " << div(n1, n2) << endl;
   } catch (DivisionByZeroException &ex) {
      cerr << "Excetion: " << ex.what() << endl;
   }
   return 0;
}

Exceptions are designed to handle only synchronous errors, such as accessing the index of an array out of bounds, division by zero, arithmetic overflow, fail to allocate memory, and so forth. Asynchronous exception, such as keyboard and mouse interrupts, network message receipt, I/O completion, and so on, cannot be handled because these events occur in parallel, independent from the program control flow.

An Exception Re-thrown

A program can decide to partially handle an exception or not handle it at all. In such a case, it can delegate the responsibility to another handler.

void func1() {
   try {
      throw exception();
   } catch (exception &) {
      throw;
   }
}

int main() {
   try {
      func1();
   } catch (exception &) {
   }
   return 0;
}

The function func1 is invoked inside the try block in main. The function func1 also contains a try…catch block. The throw statement throws an instance of a standard library class exception, called exception. The catch handler (of func1) catches this exception and throws it again, which then is caught by the catch block defined in main. The catch block in main does nothing with the exception and terminates the program.

Exception Specification

We can create a throw list for a function that enumerates a list of exceptions.

void func1() throw(Exception1, Exception2,
      Exception3){
   // ...
}

This function can throw only the exception specified with the throw. If an exception that is not specified in the throw list occurs, the exception handling mechanism invokes the unexpected function and terminates the program. However, if we do not provide a throw list as follows, it automatically invokes the unexpected function. (The behavior of the unexpected function can be customized with the set_unexpected function. Refer to the C++ Standard documentation for more information on this).

void func1() throw(){
   // ...
}

Conclusion

Most modern programming languages have the capability of exception handling as one of its features. Some languages, such as Java, is built keeping this in mind from the very outset. Due to this, using exception handling mechanism is quite common. C++, on the other hand, is a reconstruct of C; exception handling is a later addition. Moreover, this capability had to be incorporated in such a way to not disturb the already existing vast majority of code, yet utilize the benefit of this feature. Therefore, the design decision of exception handling had several corners to look into before incorporating it into actual implementation. The article Exception handling for C++ by Andrew Koenig and Bjarne Stroustrup lays down the foundation and provides important insight into its design principle.

Reference

Exception Handling for C++ by Andrew Koenig and Bjarne Stroustrup

The post C++ Exception Handling: How to Handle Exceptions in C++ appeared first on CodeGuru.

]]>