Exceptionally Bad Exception Abuse

See the original posting on DZone Python

I was reading Nick Hodges’ Coding in Delphi again last night (insomnia). In chapter 1 on Exception Handling, he opens talking about how not to use exceptions. It got me thinking about some of the atrocious exception usages I’ve seen. I thought I would share a few examples beyond the usual exception sins.

The Try/Except/Raise Pattern

The documentation on the Try/Except pattern says that all the code after the Except block gets ran because the exception is handled. Additionally, you can call Raise during the handler to send the exception further up the call stack.

Pure CSS3 LavaLamp Menu

See the original posting on DZone Python

I think that you have already seen various animated menus with the LavaLamp effect (based on jQuery plugin). Today I would like to tell you how to repeat the same behavior only with CSS3 (without any JavaScript). I had to use CSS3 transitions in our menu (to animate elements). So, if you are ready, let’s start.

Here are samples and downloadable package:

Livecoding Recap: React-Navigation With React Native [Video]

See the original posting on DZone Python

I channeled my inner Darth Vader yet again. I still don’t know why my sound is garbled on YouTube but works on LiveEdu. They’re both using the same stream.

This week, I wanted to try out react-navigation because I’ve heard a lot about it. Supposed to be the big new (official) thing since Navigator was deprecated in April.

Introduction to Progressive Web Apps (Push Notifications) – Part 3

See the original posting on DZone Python

In Introduction to Progressive Web Apps (Offline First), we discussed what a typical progressive web application should look like and also introduced the service worker. We also cached the application shell. In Introduction to Progressive Web Apps (Instant Loading), we made the app cache dynamic data and load instantly from locally saved data.

This part of the tutorial will cover:

Active Cache a RESTful Response in Crafter CMS

See the original posting on DZone Python

Any time your services depend on another service there is a cause for concern. You can’t control the performance or the availability of the external service. Further, if the response of the external service is not unique across calls then there may be no real need to call out to it on each request you receive.

In this case, what you want to do is cache the request from the external service and have your service attempt to get the content from the cache. Active cache is a built-in Crafter CMS capability that makes building these sorts of solutions much easier. You tell Active Cache what you want, how to get it, and how often to refresh it in the background. From there on, you simply ask Active cache for whatever the current response is.

JavaScript Threading: The Magic Framework Problem

See the original posting on DZone Python

The Magic Framework Problem

This happens when two ways of thinking collide.

  • The framework developers create lots of “super smart” components. These components are so good at their job because they hide the underlying complexity and deal with major issues very well.
  • The designers have an imperfect understanding of the challenges they face. This is normal – design usually happens before most challenges come up. So they design with what they know, and often with a preconceived notion of how things work.

Mix the two together: The designers assume the framework will deal with all the design issues automatically. In other words, magic.

Meditations on Writing a Queue, Part 1

See the original posting on DZone Python

What is a queue besides the line for the little teacups at Disney? In programming, a queue is a very useful data structure that can simplify our programs, especially when it comes to threading. In thsi series, I’m going to walk you through building a queue in C, talk about how to effectively use a queue, and also compare to the Queue implementation that ships with Ruby.

What Is a Queue?

While there are different types of queues, the most common is a FIFO (first in first out). The first person in line to ride Space Mountain is the first person who leaves the waiting area (and they also get the best seat).

JavaScript Data Visualization Tools and D3.js

See the original posting on DZone Python

Introduction

Visualizations convey information in a universal manner and make it simple to share ideas with others. Charts, Diagrams, Graphs, and Maps are the common Data visualization tools to understand the data easily and quickly. These interactive and dynamic tools are used to convey our business ideas to share with our audience and target users. There are many JavaScript Graph and Chart Libraries available, but choosing the right one for your web application has its own challenges.

This article will highlight the challenges we faced in one of our business use cases and our analysis before arriving at D3.js.

Learn MVC Using Angular Idle

See the original posting on DZone Python

This article demonstrates MVC using Angular Idle with a UI Bootstrap. This article will show you how to get your application to report if a user is idle.

Angular Idle

Angular Idle can use an Angular module to detect and respond to idle users. We can almost maintain the session on the client side.

Webpack and npm for Simple Java 8 Web Apps With Undertow

See the original posting on DZone Python

Java doesn’t have the best reputation when it comes to web development. Let’s face it, it’s a verbose language littered with large frameworks (they have their place, but not all tasks require a framework) that can be quite daunting to learn. It would be tough to argue against using a dynamic language such as Ruby or JavaScript when deciding to build a web application. They have great tooling, and dynamic languages tend to speed up web development productivity.

How large is the gap though? If an experienced Java dev wants to build a website/application should they learn a new language or possibly have a single page app with a Java-backed REST service? Or should they pick one of the many frameworks, like GWT, Vaadin, JSF, PrimeFaces, or one of many MVC frameworks? After exploring both single page application frameworks and Java frameworks, there seems to be quite a large learning curve, one that there isn’t time for. Why can’t we build a very quick server side rendered website for a quick MVP or even a full-size project?

Angular Materialized Autocomplete With $http Service

See the original posting on DZone Python

This article is about Angular Materialized Autocomplete. The documentation for Angular Materialized is here. This documentation has a different version of Angular Materialized.

Things That You Can Try Out With AngularJS Material Autocomplete:

1) Simulate a Query.
2) Enable/Disable Caching.
3) Disable the Autocomplete on an Event.
4) Customization of a Listing Template.

ReactJS Authentication Tutorial, Part 3

See the original posting on DZone Python

Welcome back! If you missed Part 1 or Part 2, follow the links to check them out! 

Adding Authentication to Your ReactJS App

The majority of the apps we use on a daily basis have a means of authenticating users. I’ll show you how to easily add authentication to our ReactJS application. We’ll use Auth0 as our authentication service.

Top 5 Free Tools for Rapid Web App Development

See the original posting on DZone Python

Starting up has never been easier, but it’s easy to forget yourself and start shaving a yak instead of getting things done. I’ve been there so many times, I decided to settle for a toolkit that allows me to start (and fail) fast, without spending a single cent, with a limited amount of time. The 5 tools I want to present now are the absolute minimum with which I tend to start every new project.

The list contains mostly the applications that are helpful in setting up landing pages and very limited MVPs. You won’t find here backend solutions or languages that will help you build an application with killer performance. Usually the solution there is to go with whatever is the cheapest, but the end-user does not see the end result anyway.

ReactJS Authentication Tutorial, Part 2

See the original posting on DZone Python

Welcome back to our series on ReactJS! If you missed Part 1, you can find it here

Build The Front-End With ReactJS

In the early days of ReactJS, there was no tool or common way to set up a ReactJS app. However, React is more mature now; plenty of boilerplates, starters, and open-source tools are currently available to help you set up an app. There is one that stands out because of its simplicity. It’s called the Create-React-App (CRA) CLI tool. It’s being maintained by Facebook.

ReactJS Authentication Tutorial, Part 1

See the original posting on DZone Python

ReactJS is a JavaScript library, built and maintained by Facebook. It was developed by Jordan Walke, a software engineer at Facebook. It was open-sourced and announced to the developer community in March 2015. Since then, it has undergone tremendous growth and adoption in the developer community. In fact, at the time of writing this article, ReactJS was the 5th most starred project of all time on GitHub.

Currently, many web platforms use ReactJS to build their user interfaces. Such platforms include Netflix, Instagram, Airbnb, KhanAcademy, Walmart and more. The documentation is very detailed, and there is a vibrant community of users. In addition, a plethora of ReactJS addons exists on GitHub for easy inclusion in your project for whatever functionality you are trying to build.

Cascading Dropdowns in ASP.NET MVC

See the original posting on DZone Python

The Ultimate Guide to Dropdowns in ASP.NET MVC Series

We’ve all seen this scenario before.

You want to filter the user’s selection by using one dropdown to filter out the second dropdown. Some take it even further where you have a third dropdown for filtering.

Setting Up New Relic on Django, Apache HTTPD, and mod_wsgi

See the original posting on DZone Python

If you’ve used New Relic before, then you know that it’s normally pretty easy to integrate and doesn’t require any code modifications — at least, it didn’t when I was using their Java agent.

Using their Python agent on my Django application deployed with Apache HTTPD and mod_wsgi didn’t turn out to be so straightforward.

Screeps: The MMO Sandbox Game for Programmers

See the original posting on DZone Python

I recently attended the wonderful Pioneers conference in Vienna (more interviews to follow) and among the many interviews I conducted was Artem Chivchalov, the Russian founder of Screeps, a massively multi-player online (MMO) game with something of a difference.

In most MMO games you choose a character with a variety of traits and set it loose into a world full of other human controlled characters and characters controlled by an artificial intelligence. In Screeps, there is something of both, but it’s up to the players to create it. Yes, you need to code your own characters to play.

1 2 3 75