Application Development | Programming

  • Quietly, startup Fitabase hits major Fitbit health research milestones

    Since early 2015, investigators have ResearchKit for collecting data from Apple devices. Then, ResearchStack came along for for studying Android users.

    But the research community has been able to pull in information from Fitbits and other connected, wearable devices for four years with the help of a research platform called Fitabase.

    This week, Fitbit announced that Fitabase, made by San Diego-based startup Small Steps Labs, has now collected more than 2 billion minutes of Fitbit data for research purposes. Fitabase also has supported more than 200 research projects since its 2012 founding, the company also disclosed.

    “What we’ve built is kind of the missing piece for research,” said Fitabase CEO Aaron Coleman. The platform collects and de-identifies data from Fitbit users and offers data pools to academic researchers, including many in healthcare. “This removes a lot of privacy concerns,” including those around HIPAA, Coleman said.

    “This is a technology that bridges a consumer device like Fitbit with the needs of research,” Coleman said. “Researchers are loving this new paradigm of research.”

    That’s important because millions have purchased and regularly use activity trackers. The data these wearables collect provide insights about movement, heart rate and sleep patterns that previously had not been available, plus people actually enjoy wearing their Fitbits.

    “It was really difficult to get people to use pedometers,” Coleman noted. That made it tough for researchers and clinicians alike to collect good data and, more importantly, improve health.

    “Devices help people better tailor their activities and their health,” Coleman said. “Interventions shouldn’t be the same for everyone.”

    For example, Fitabit is helping researchers determine how quickly people regain their previous level of activity following surgery. “They can tailor interventions to people who need it most,” Coleman said.

    So what about the “2 billion minutes” of Fitbit data? “We provide the researcher with de-identified data at the minute level,” Coleman explained. Each person’s activity levels can vary at different times in the day. Having this insight allows researchers — and, ultimately, healthcare professionals and caregivers — to schedule interventions when they are most likely to be effective, according to Coleman.

    Coleman pointed to a research project at Arizona State University, where Eric Hekler, director of the school’s Designing Health Lab, is applying engineering strategies to study what Hekler calls “precision behavior change,” a complement to precision medicine. Hekler and research partner Daniel Rivera, director of the ASU Control Systems Engineering Laboratory, are testing “health interventions that are adaptive and individualized, versus static and generalized,” according to a Fitbit statement.

    Coleman himself also has applied individual Fitbit data to control the level of difficulty in an app called Tappy Fit, a Flappy Birds-like mobile fitness game.

    Photos: Fitabase, Fitbit

  • Web Development: Key Languages to Know

    shutterstock_252367738 (1)

    Web programming is a desirable skillset—and a lucrative one. Earlier this year, Dice reported that, when it comes to return on investment in education, Web developers rank among the top jobs, with the average annual salary hovering at around $77,000.

    Better yet, the Bureau of Labor Statistics believes the number of Web developer jobs will continue to grow through 2022. And according to a report issued late last year by Wanted Analytics, global demand for Web developers is high.

    That demand makes it harder and more expensive for companies to hire top talent. It also means that those skilled in Web development can demand a premium in salaries and perks.

    “In today’s professional world, it’s important to stay on the cutting edge,” said Zach Sims, CEO of Codeacademy. “Programmers who learn many Web languages are able to stay versatile and keep a pulse on the evolving professional needs within their field.”

    But which languages are essential for any Web developer to know, especially if they want to lock down a good salary?

    CSS Still Matters

    Cascading Style Sheets (CSS) is a style-sheet language that provides the backbone for how Websites should look and behave, and ensures proper spacing, alignment and the integrity of other key design elements.

    Those without in-depth CSS knowledge will have a hard time designing a Website, since the language dictates so much in terms of look and feel. Anyone who wants to develop for the Web can’t overlook it.

    PHP: The Basis of Key Platforms

    PHP is a server-side scripting language that acts as the foundation for many of the world’s most popular Web platforms, including WordPress. Although periodically dogged with security issues, PHP boasts a flexibility that makes it useful in everything from standalone graphics applications to generating HTML code.

    Anyone who learns PHP should do their best to become as familiar as possible with the platform’s open-source libraries, as well as how it interacts with database servers such as MySQL and PostgreSQL. If you’re interested in boning up on your PHP knowledge, check out these Dice articles about the difference between it and .NET, some programming basics, and how to answer job-interview questions related to it. From conditionals to arrays to loops, there are all kinds of things to learn about PHP, but once you know what you’re talking about and how to fix issues, you’ll be far ahead of competitors for many must-have jobs.

    JavaScript for the Masses

    JavaScript regularly tops the lists of most-popular programming languages, and with good reason: alongside CSS and HTML, it helps power the vast majority of Websites around the world.

    The interpreted programming language allows programmers to create critical workflows, apps, games, and just about everything else they can think up; it combines a series of items, including data structures, objects, and countless other elements, to help users build whatever they desire. So it’s a versatile platform, but also one with a lot of moving parts—programmers interested in learning more about it will need to explore everything from choosing the right frameworks to advanced tools such as strict mode.

    JavaScript knowledge can also be parlayed into mobile development. “We often encourage learners to start with JavaScript,” Sims said. “It’s one of the most versatile programming languages around. Learners can utilize their knowledge of JavaScript to build a wide-range of products for both web and mobile use.”

    HTML as the Basis of Understanding

    HTML has been around forever, and it’s arguably the easiest of any Web language to learn. It remains important as the Web’s standard markup language.

    Given its age, discussions on HTML and its importance are old and staid. That being said, any newbie getting into Web programming should learn the basics of HTML, understand how to create different tags, and design simple Websites for practice.

    Conclusion

    Focusing on just one of these languages is not enough to be a successful Web programmer. As Sims said: “A flexible mindset is the key to success.” The key is to not only learn thoroughly, but also put yourself in a flexible mindset that will allow you to adapt to the inevitable changes in languages and methodologies.

    As seasoned Web programmers know, there’s always something to learn, and no shortage of languages worth pursuing.

    The post Web Development: Key Languages to Know appeared first on Dice Insights.

  • Mobile app with HIPAA privacy questions?

    Many mobile health developers — and rightfully so! — are curious about just what features and protections their devices need to have in order to comply with HIPAA privacy rules.

    [See also: OCR: 'Pay attention to details']

    Privacy & Security

    read more

  • Choosing a JavaScript Framework

    shutterstock_112692424

    In software development, choosing the right technology for the right job is (arguably) the most important decision a developer can make. But it’s also something easier said than done: For example, you can use many different general-purpose programming languages for the same job, and it’s not clear which one is the most suitable. At other times, a project has particular needs that only a handful of technologies or platforms can provide.

    With all that in mind, let’s talk about the differences between some JavaScript frameworks, focusing in particular on how to choose the right one for the right project.

    As JavaScript has grown, people have created different libraries to expand its utility in Web development. Some of those libraries, such as AngularJS and Ember, are incredibly popular. Unless you’ve actually built a few applications with each one, it’s hard to get a feel for their respective strengths and weaknesses. (I’ve met a lot of Web developers who picked what they thought was the best one, used it for a year, and then, while deep into their project with no turning back, decided they had made a mistake.)

    Know What the Features Mean

    Before you can really understand what the frameworks offer, you need to understand what the different features even mean. MVC? MVVC? One-way or two-way binding? And so on. We’ll get into those briefly, but before that, let’s consider a most important point:

    Focus on the Final Product

    When choosing a framework, focus on what you’re trying to accomplish. How sophisticated is your Web application’s front end? Will you be doing a lot of JavaScript number-crunching, and thus need easy access to the data? Or will you be creating a beautiful front end that is user-oriented but doesn’t have a lot of data manipulation?

    The strength of your coding skills is still another factor in framework selection. Different frameworks allow you more leeway and freedom—but with that freedom comes the need to do more actual coding.

    Some frameworks are considerably larger than others, and lock you into specific architectures. AngularJS is a good example; it’s difficult to stray outside of the suggested architecture, but the architecture comes with a long list of features that automatically take care of problems for you, which means less coding.

    Compare that to a framework such as Knockout, which gives you much more flexibility, but you also have to do a lot of rolling your own to figure out what works best for you. (Ember falls in the middle, although some people might disagree.)

    Models, Views, and Controllers

    Most of the frameworks take different approaches regarding models, views, and controllers. The model is your data. The view is what your users see on the screen; treat it as a representation of your data. The controller is the code that manages the data.

    Frameworks differ in how the models, views, and controllers are architected. A lot of developers have found a need to separate the model into two different types of data: one is the actual data stored in the database, and the other is the temporary data that assists in what the user sees on the screen. The “real” data exists in one format, but to be presented on screen, it needs to be in a slightly different “shape” in order to be manipulated by the user interface.

    This need has resulted in an addition to the Model-View-Controller (MVC) architecture, with a fourth component, the Viewmodel. I found some great explanations of the difference between MVC and Model View ViewModel (MVVM) on Stack Overflow and one blog. (I will usually put additional data inside the viewmodel that isn’t part of the main data, such as a list of countries needed to populate a dropdown list.)

    Data Binding

    Next comes data binding. Before these frameworks existed, you had to put your controls in your HTML, and then use jQuery to read the data out. If you wanted to gather up data to be sent to a server through AJAX, you had to gather the values from your different controls; or if you were reading data from the server, you had to go through the data and populate your controls. This was a headache.

    Data binding refers to copying the data values between your model and your controls on the screen. Thus, if your model has a user object containing a first name and last name, the framework will put the first name and last name on the screen automatically for you. With two-way binding, as the user modifies the first name and last name inside a control, your data automatically updates.

    People have differing opinions about whether two-way binding is a good thing or not, and whether a library should allow it. Regardless of those opinions, different libraries do allow it; and if you need it, you obviously want a library that supports it.

    Here’s a great video and slideshow that explains how our three libraries, Ember, knockout, and AngularJS compare on two-way binding. (Despite that support, developers have still found themselves in messy situations, particularly with AngularJS and Ember; consider carefully the implications of one- or two-way binding before going down either road.)

    Examples

    In all of these frameworks, you’re going to be writing code. (If you’re not comfortable writing JavaScript code, now is the time to start learning it.)

    With the below example, I’m focusing on Knockout because that’s the one I’ve been using lately (which is not to say it’s always the best one for the job). Suppose you have a model that includes first name, last name, and home country, like so:

    
    var model = {
    
    firstName: 'George',
    
    lastName: 'Washington',
    
    country: 'USA'
    
    }
    
    

    In order to use two-way binding, you have to wrap functions around each item, using what are called observables:

    
    var modelObs = {
    
    firstName: ko.observable('George'),
    
    lastName: ko.observable('Washington'),
    
    country: ko.observable('USA')
    
    }
    
    

    You can learn the details on how this works on the Knockout website. For now, I want to point out that if you bind each member to an input box on a page, the value will immediately change in your model in response to the user’s input. If the user types “Thomas” in the first name field, you’ll get a different value when you check the firstName function:

    
    console.log(modelObs.firstName());
    
    

    will show ‘Thomas’.

    Or, if you change model, like so:

    
    modelObs.firstName('Ben');
    
    

    then the input box on the screen will immediately change. That’s what two-way binding is all about. (As an exercise, think about why you need a function to set the value, rather than a simple assignment, as least with old versions of JavaScript.)

    Conclusion

    There are many more frameworks out there that you’ll want to explore. If you’re looking for work as a Web developer and trying to decide which framework to learn, you should look at the requirements of the jobs that interest you. If you’ve been focusing on Ember but seeing only AngularJS in job postings of note, then perhaps it’s a good idea to explore AngularJS. That’s what will ultimately help you decide which frameworks to learn.

    The post Choosing a JavaScript Framework appeared first on Dice Insights.

  • Drones Offer Opportunity for Software Pros

    shutterstock_262482947

    Thanks to astonishingly rapid growth in the unmanned aerial vehicle (UAV, a.k.a., “drone”) industry, there are now tremendous opportunities for software engineers with hardware sensibilities and a toolbox full of compatible hard- and soft-skills.

    The Boom and Beyond

    A few years ago, the Association for Unmanned Vehicle Systems International predicted that the drone industry would create 100,000 jobs by 2025, accompanied by an economic impact of $82 billion. More than 20 industries—representing some diverse business models—have already received exemptions from the Federal Aviation Administration (FAA) to operate drones commercially in the National Airspace System. As the commercial applications of drones expand, the number of companies operating them will, as well.

    It will take a lot of collective effort to produce enough technologists to fill all those positions that will open up over the next several years. Colleges and universities across the country are already trying to take up that slack by developing comprehensive drone studies programs.

    Crossover Skill Sets

    Even if you don’t want to go back to school or haven’t worked with drones professionally, there’s good news: A lot of existing software skills will transfer to drone work.

    “What we are really looking in this drone space isn’t reinventing the wheel,” said Andrew Slater, vice president of software at PrecisionHawk, the Raleigh, N.C.-based, end-to-end maker of drones for remote sensing. “Ninety-nine percent of what we do is problem solving. Beyond the ability to write good code, the candidates we look at have great problem-solving skills.”

    Unlike many other UAV companies, PrecisionHawk focuses on the end-to-end system, from collection to analysis. Accordingly, the company’s need for candidates with a wide range of skills gives some insight into the required and recommended skill sets for the drone industry as a whole.

    “We deal with a lot of remote sensing data,” Slater said. “We operate with a data-first mentality; however, because we have this complete system… Our hardware and software teams have to be able to work cohesively, establish scalable specifications and define software/hardware interfaces.”

    The Gritty Details

    PrecisionHawk uses proprietary software, but its tech-hiring managers look for candidates who possess advanced knowledge and experience in the following areas:

    “Preferred skills” include:

    • Knowledge of complete end-to-end flight systems, including: ground system, hardware, software, ground support equipment and simulators
    • Experience with MATLAB/Simulink coders
    • Ability to comprehend circuit design data and documentation
    • Experience in robotics and/or embedded programming for unmanned vehicles

    Familiarity with the following will make you stand out:

    Languages and Soft Skills

    In general, drone companies require experience with at least one scripting language: Python, Ruby, Bash, JavaScript, Java, and C/C++/C# top that list.

    Depending on specific requirements, companies may also ask for knowledge of the following:

    • Node.js
    • GCE or other IaaS providers
    • Cybersecurity
    • Troubleshooting, debugging and documenting

    Critical soft skills include:

    • Self-motivation
    • Above-average written and verbal skills
    • Ability to work comfortably in a collaborative environment
    • Interacting professionally with customers, management and other developers
    • Ability to attain a secure clearance

    Must Love Drones

    Like any industry, coming in with knowledge of the latest developments—and an affinity for the underlying technology—is a plus. “Many of our best programmers and developers have their own drones,” Slater said. “They appreciate the industry and understand the general language and jargon. That genuine interest allows them to really buy into the project they’re working on.”

    The post Drones Offer Opportunity for Software Pros appeared first on Dice Insights.

  • 5 Online Resources for Developer Woes

    shutterstock_284450024

    Programming something entirely new can be a fun and challenging experience. For many, it’s a career that both pays well and gives the individual the opportunity to do something meaningful for others.

    At other times, trying to get the job done isn’t a smooth process. While there’s a sense that developers will always know how to fix issues or address certain problems, there are times when they’re stumped and need help.

    “The biggest woe developers face: not knowing what we’re doing,” Art Gillespie, director of engineering at Udacity, which offers online programming classes, said in an interview. “The funny thing about being a software engineer is the unavoidable fact that, most of the time, your expertise and experience is irrelevant to what you’re working on. That thing you have to accomplish today requires some library or algorithm or language or technique that you just don’t know. Yet. ‘Woe’ doesn’t do it justice.”

    Considering all that, it’s perhaps no surprise that a slew of resources have cropped up on the Web to offer developers help in their times of need. Whether it’s a simple question or a detailed one, the following resources have helped Gillespie and others quickly get answers and solutions to some of the most vexing programming woes:

    Code Academy

    As Gillespie noted, it’s not always easy for software engineers to admit that they don’t necessarily know what they’re doing in every case. That’s where Code Academy comes in.

    Code Academy is a service for budding developers (or those who already know what they’re doing and want to beef up their skills) to learn coding basics across a range of languages. While Code Academy likely won’t help the seasoned expert who is intimately familiar with Rails, SQL, and other languages, it could assist those who need to improve to their basic skills or want to learn a new language they haven’t yet tried out. In any case, it’s worth having a Code Academy account and calling on it whenever it comes time to learn something new.

    Stack Overflow

    Stack Overflow has proven a savior for countless developers over the years. Structured as a community that allows developers and others to share what they’ve learned, Stack Overflow is a go-to resource for thousands of tech pros.

    Stack Overflow also allows developers to post their own code, ask questions, help resolve other developers’ issues, and more.

    Dash

    Dash is an option for any developer who would like to learn more about building websites. Built by General Assembly, the platform teaches HTML, CSS, and JavaScript through a series of interactive projects. In addition, it’s a nice repository for documentation.

    GitHub

    GitHub is a repository for programming projects, as well as a wide range of information on software development. Many developers find GitHub a good place for getting solid tips on building and maintaining their projects.

    As Gillespie pointed out, GitHub can save developers time, since its users regularly post solutions to what seems like millions of problems. Also, the thought of thousands of people struggling with the same issues will “make you feel better about your struggles,” he added.

    Code.org

    Code.org pitches its service toward kids and wet-behind-the-ears beginners, but it’s also useful for more experienced developers who want to quickly pick up on the basics of a new language. From there, those developers can head over to GitHub and other sites for more advanced advice and resources.

    For beginners just learning the very basics of programming, Code.org allows them to go through lessons at their own pace, which is a definite plus.

    The post 5 Online Resources for Developer Woes appeared first on Dice Insights.

  • Learning Enough Python to Land a Job

    shutterstock_244148398

    If you want a job programming in Python, prepare to do a lot of work beforehand. The language is easy to pick up, but you need to do more than just learn the basics; to get a job, you need to have a strong understanding of some pretty complex processes.

    Python is a general-purpose language, which means it isn’t used for just one purpose such as Web development. Rather, it’s used in many different industries, and the industry in which you choose to work will determine how you actually learn the language.

    For example, if you’re hired to write apps that interact with operating systems and monitor devices, you might not need to know how to use the Python modules for scientific and numerical programming. In a similar fashion, if you’re hired to write Python code that interacts with a MySQL database, then you won’t need to master how it works with CouchDB.

    Check out the latest Python-related jobs.

    Therefore, I’m going to suggest that there are three levels to learning the basics of Python:

    • Learn the core language itself, such as the syntax and basic types; learn the difference between Python 2 and Python 3.
    • Learn the commonly used modules, and familiarize yourself with other modules.
    • Learn the bigger picture of software development with Python, such as including Python in a build process, using the pip package manager, and so on. This involves learning about different databases and other technology, depending on where you want to work.

    True Beginners

    At a basic level, Python is an easy language to learn and use. You can quickly learn how to create variables and loops, for example, and expand beyond that to tuples, lists, and dictionaries. Any Python newbie needs to know which types are immutable, which means an object of that type can’t be changed (answer: tuples and strings). With immutable types, the object’s value itself can’t change, but the variable containing the object can:

    a = 'abc'
    
    a = a.upper()
    
    

    In the above example, the original string “abc” did not change, as strings can’t change; instead, we calculated a brand new string, “ABC,” and stored that back into the original variable. Knowing that sort of thing should be second nature to anyone who seeks to understand how Python works.

    In addition, anyone learning Python should know how the language deals with object-oriented programming, and how to create classes and instantiate objects. It’s also important to know how to use exceptions and exception handlers, and how modules interact. (For key insights, I recommend you read and understand the Python Language Reference; if you’re ever unsure about syntax or how the language works, or are arguing with a coworker, that website will have the final word.)

    The Python beginner must also know how Python 2 and Python 3 are different. Python 3 has been out for quite some time, but there are still a lot of projects that rely on Python 2. If you’re interviewing for a position, you’ll want to ask which Python they’re using; if you’re knowledgeable, you can then speak about the differences.

    Slightly More Advanced

    Once you’ve mastered some basic concepts, you can move on to slightly more advanced concepts. If you’re familiar with languages such as JavaScript, Python’s strong typing might surprise you; for example, you can’t just add “hello” to “10” to get “hello10.” (You’ll get an exception.) This is meant to prevent bugs in your code, and it means you’ll need to become very familiar with dynamic typing, strong typing, duck typing, and how Python implements all three.

    C++ programmers coming to Python might be surprised that you don’t need to provide an interface for a parameter in a function; if the object passed in has the required methods, you’re good to go. This makes polymorphism easy.

    From there, it’s important to know about closures and “first class objects.” Python supports both, which leads to a concept called decorators, which this article explains very well. Here’s an interesting example of closures, modified from one offered in the linked article; this is entered from the interactive shell:

    
    >>> def outer(x):
    
    ...     y = x * 2
    
    ...     def inner(z):
    
    ...         return y + z
    
    ...     return inner
    
    ...
    
    >>> q = outer(5)
    
    >>> r = outer(6)
    
    >>> q(2)
    
    12
    
    >>> q(3)
    
    13
    
    >>> r(2)
    
    14
    
    >>> r(3)
    
    15
    
    >>>
    
    

    The function outer creates a closure with the variable called y, and returns a new function that you can call. I called the outer function twice to create two such functions; then I called those two functions each twice.

    Last but certainly not least: Read “The Zen of Python,” which is funny and real, and check out this thread on Stack Overflow for some great suggestions about how to master the language. Go to GitHub and find any of the many popular Python projects; study the code as much as you can.

    Side Note: Learn the Modules

    The modules are your libraries, your helpers. Know what’s available in the standard library; you don’t have to memorize every member of every class, and every class of every module, but you do want to know what’s available so that when you need something, you don’t go rewrite one from scratch.

    Familiarize yourself with each module. Many, such as file I/O, have access in almost every application; know these inside and out. For example, know how to open a file with different access, how to read a file, how to write a file, and how to determine if a file or directory exists. Know how to use the os.path module for file-path joining and normalization, rather than writing your own string routines to handle file paths. Finally, understand the cross-platform implications.

    Next: Learn Software Development With Python

    There are many tools for integrating Python into a software development cycle. If you want to master the language in a real-world context, learn how to obtain Python packages using pip. You should also learn how to do unit testing, which is fundamental to software development in Python; many people get turned down for Python-related jobs because they can’t answer interview questions in this area. (The Hitchhiker’s Guide to Python includes some great information on unit testing.)

    You should also know how to package up Python programs for distribution, and know your way around both the Windows command prompt and Linux bash shell. Any developer worth their salt can use the tools for general software development, from editors and IDEs to git for source-code control.

    Targeting an Industry or Technology

    Once you’re familiar with all the above, you can begin to move into industry-specific knowledge.

    If writing C or C++ extensions to Python interests you, check out this resource. If Web development tickles your fancy, you’ll need to understand the difference between a Web server written in Python that you can extend, and a Web framework that allows you to write your own server software in Python. If you go the Web route, you’ll need to become proficient in Web technologies—not only other languages such as JavaScript, but how to develop Web-scalable software.

    There’s also some crossover between specializations. For example, if you’re building Web server software in Python that runs on a cloud, you might need to know how to build cloud-monitoring and management tools (possibly in Python as well). Those tools include Amazon AWS SDK for Python, or the OpenStack’s official clients, which are also written in Python.

    If you want to land a job in a scientific industry, you’ll need to know the various scientific and numerical modules inside and out, and have strong skills in writing tight algorithms. For jobs in high-performance computing, you need skills such as concurrent algorithms, SIMD vectorization and multicore programming. For a full list of how to use Python in a work context, check out the dedicated page for applications for the language.

    The post Learning Enough Python to Land a Job appeared first on Dice Insights.

  • Should Mobile Devs Focus Only on iOS?

    Screen Shot 2015-07-13 at 10.55.11 AM

    Financial-news websites are aflutter this week over news that Apple has seized 92 percent of the mobile-device industry’s total operating income; that’s up from 65 percent in 2014. According to financial-services firm Canaccord Genuity, which generated the data, Samsung and Apple pretty much divide the entirety of the mobile world’s profits between them.

    Those estimates are great for Apple, but what does it mean for the mobile developers and app builders out there? First, Apple clearly has quite a bit of momentum behind it; if anyone ever doubted the long-term viability of iOS, numbers like these should settle that issue once and for all.

    Check out the latest iOS-developer jobs.

    Second, the overall picture for third-party operating systems—including Windows Phone and BlackBerry OS—is bleaker than ever; manufacturers won’t build what isn’t profitable, and clearly iOS and Android are the only platforms at the moment capable of generating significant amounts of cash. Any developers who devoted time to building Windows Phone and BlackBerry apps will likely need to think very hard about whether they want to continue iterating on those products.

    But third, Apple and iOS haven’t outright won the mobile-device wars. Although it swept up the vast majority of the profits, Apple sold less than 20 percent of the actual smartphones on the market. Even if most manufacturers aren’t making very much money off Android, there are millions of people using the OS, which means a massive market for app-builders. The idea of building apps for both iOS and Android remains a powerful one for many developers.

    The post Should Mobile Devs Focus Only on iOS? appeared first on Dice Insights.

  • Is MongoDB Really Superior to MySQL?

    shutterstock_208391014

    When MongoDB came out six years ago, the NoSQL fad was in full swing. Rather than rely on a table-based relational database structure, MongoDB utilizes BSON, or “Binary JSON,” which many users found attractive; the platform quickly grew into a leader among NoSQL databases.

    As more people took the MongoDB plunge, however, many began to complain about various issues, including its lack of speed. For the past few years, people have debated whether that initial hype was worth it. Now that the technology’s reached maturity, and many of its most annoying bugs have been squashed, that question can be confronted head on: Is it worth using MongoDB when you can stick with an old, rugged SQL standby such as MySQL?

    Before we dig into the issue, let’s look at the purpose behind each technology:

    • MySQL is for storing relational data
    • MongoDB is for storing documents in JSON and BSON

    I’ve seen a lot of developers favor a NoSQL solution such as MongoDB for the bulk of their work, because they assume that MySQL remains unable to accomplish certain tasks. “My data has a unique layout, that can’t be put into relational, tabular form,” these people claim. But if you do some digging, you’ll often find that people are able to accomplish whatever they need with a relational database, provided they code carefully and don’t try to take shortcuts. The format is more versatile than many people will admit; for decades, people have created complex structures and stored them in relational databases just fine.

    Check out the latest database-related jobs.

    Developers also dislike certain aspects of MongoDB. It doesn’t allow joins, for example, which leads people to stuff in gigantic documents with lots of repeated data, creating a royal mess. Making things worse is MongoDB’s insistence on restricting access; if you’re adding customer orders to a giant document, other people can’t add rows until you’re finished. With MySQL, on the other hand, people in that situation could add orders simultaneously. (Those who insist on bringing joins-like functionality to MongoDB can put records in separate documents, although this can require some creative coding on the developer’s part.)

    Even those companies and prominent developers who like MongoDB don’t rely on it for every database-related issue. For example, some firms have a real problem with what they perceive as MongoDB’s lack of ACID compliance. If your project requires large amounts of normalized data, with loads of reads and writes, it’s probably best to go with MySQL, rather than “trying to make it work” in MongoDB.

    As with any popular software platform, both MongoDB and MySQL suffer from perception issues, some of which are, frankly, unfair. People claim that MySQL doesn’t easily scale horizontally, and that the only option for doing so is to increase memory on a single MySQL server. That’s an outmoded claim; there are plenty of ways to scale. In a similar fashion, a lot of people insist that MongoDB will crash and cause massive data loss; while that was an issue in the past, developers have squashed many of the related bugs.

    So is it worth using MongoDB over MySQL? Not in every situation. When deciding which is better suited to your project, spend time studying the documentation for both, and try working with a dataset in MongoDB to see whether it fits your needs. Understand the role that benchmarks play: For instance, if you’re building a website that does a handful of database queries per second, does it matter which database can perform a couple thousand per second? Bottlenecks can have a huge impact on application performance; it pays to read up on how to optimize your implementation, regardless of which one you choose.

    I’ve been engaged in SQL programming since around 1990. When I found MongoDB, it was like a godsend, as it allowed me to store complex structures easily. Over time, however, I realized I was relying on MongoDB as a sort of a crutch, and moved back to MySQL. Today, I use MongoDB when I need document storage that doesn’t require continual tweaks of small fields, but I generally use MySQL for most of my work.

    But my situation doesn’t apply to everyone: Explore both, learn them well, and you’ll find what works best for your needs.

    The post Is MongoDB Really Superior to MySQL? appeared first on Dice Insights.

  • JavaScript You Need to Know For a Job

    shutterstock_130719125

    JavaScript is a programming language that’s easy to pick up, but extremely difficult to master. Even some of its beginner-level functions are decidedly not beginner-friendly. When you land your first JavaScript job, you’re going to want to know as much as possible, if only so you can navigate through some of the language’s trickier aspects without needing to ask for help.

    Below is the bare minimum of what you’ll need to know to work with JavaScript (beyond the absolute basics such as variables, functions, the difference between null and undefined, and so on). For those who have some JavaScript knowledge, the following list might miss some specific elements you think belong there; but the idea here is that, if beginners are at a level where they understand the presented items, they probably understand the language enough to operate effectively.

    Check out the latest JavaScript-developer jobs.

    The Beginner’s List

    • Know what a prototype is, what the “this” variable does, and how to use both.
    • Know the difference between a list and an object (and how a list is technically both, and can be used as both).
    • Know that functions are objects that can be passed as parameters into other functions and returned from other functions.
    • Know what closures are and how to use them. This might seem like an advanced topic, but when working with functions returning functions, it’s easy to introduce bugs if you’re not careful.
    • Know how to use functions such as the list’s map and filter functions. With this in mind, I encourage you to read this specification and learn the methods available on all types of objects.
    • Know your way around the developer command line and debugger. All the major browsers provide these now.

    Slightly More Advanced (Document Object Model)

    The DOM (Document Object Model) is the browser’s representation of a Web page. The DOM isn’t technically part of JavaScript, but it’s a big part of browser programming with JavaScript. As such, most employers are going to expect you to know your way around the DOM if you’re applying for a JavaScript job. Vital aspects include:

    • Accessing the DOM directly from JavaScript. For example, know how to locate elements through calls such as getElementById, getElementsByClassName, getElementsByTagName, and so on. Also know how to use the newer selector methods: querySelector, querySelectorAll.
    • Accessing the DOM using jQuery. Again, jQuery isn’t part of JavaScript, but a lot of employers expect you to know it. Know the difference between $(‘a’) and $(‘.a’). A simple dot changes everything.
    • Understand the global object, how the browser provides the global object, and how you access it through your JavaScript programming. (Answer: The browser provides the window object (lowercase w) as the global object.) Understand why the browser is the service implementing the global object and what happens when you move JavaScript code outside of the browser, such as to Node.js.

    A lot of documentation presents the DOM API using what looks like C-language interfaces. That’s because under the hood, the objects likely are C objects. You access these objects through your JavaScript code. For example, when you call getElementById, you get back an element. But under the hood, that object is a C object with properties and methods.

    This page on the Mozilla Developer Network shows you the different properties and methods available. An element is descended from a node, which means, if you have an element, you can call any of the properties and methods available on this page for a node. Try it right now—press F12 and open up the console. Here’s how you get an element:

    
    e1 = document.getElementsByClassName('header-bar')[0]
    
    

    …and then a child of that element:

    
    e2 = e1.querySelector('.container')
    
    

    And then remove that second element. The interface for the node class tells us there’s a removeChild function, so here you go:

    
    e1.removeChild(e2)
    
    

    And watch the top bar on this page you’re reading disappear. Done. (Refresh the page to bring it back.)

    In addition to the DOM, there’s much more you’ll want to study regarding Web pages and how they fit together with JavaScript. You must know how to add events to elements and how to handle the events. Know both the pure JavaScript way,

    e1.addEventListener('click', function(e) {
    
       console.log('CLICK!'); }, false);
    
    

    as well as the jQuery way:

    
    $(e1).on('click', function() { console.log('CLICK 2!'); } )
    
    

    Spend some time exploring the HTML5 features, such as how to save to local storage and manipulate a canvas element. Again, these are not technically features of JavaScript; they’re APIs provided by the browser. But if you’re trying to land a job writing code that runs in the browser, you’ll want to know how they work.

    And then there’s the biggie, Ajax. You must know what Ajax is—a way to make calls back to the server—and how to use it.

    Even More Advanced

    Now take your JavaScript programming to the next level. The more you know, the better. As before, here’s a sampling of things to know:

    • Know how to call bind and apply on a function, what the differences are, and why you would need to use them.
    • Know the different ways to create objects, including Object.create, and when you’ll need the hasOwnProperty method:
    
    x = {a:1, b:2};
    
    x.toString(); // prints out [object Object]
    
    x.hasOwnProperty('a'); // returns true
    
    x.hasOwnProperty('toString'); // returns false
    
    

    compared to:

    
    x = Object.create(null);
    
    x.toString // is undefined
    
    
    • Know the different ways of implementing object-oriented programming, especially inheritance.
    • Know what promises are, and learn two important asynchronous libraries: async and Q. They’re used a great deal in server-side Node.js programming, but can also be a huge benefit in browser programming.
    • Learn server-side Node.js programming. It will really force you to become a JavaScript guru.

    Conclusion: Even Further

    If you know the material in the third section, you’re in great shape. But there’s always more to learn. Want to take it even further? Learn about ES5 and the newest features of JavaScript that might not be present in all browsers. Learn the different frameworks, such as Backbone, Ember, Angular, and Knockout. The more you know, the more likely you’ll land that job.

    The post JavaScript You Need to Know For a Job appeared first on Dice Insights.