teleren/devto huggingface dataset:
RAM vs CPU
Tags: discuss, ram, cpu
Published: 2017-08-21 17:33:49

---
title: RAM vs CPU
published: true
tags: discuss, ram, cpu
---


Designing your program needs a lot of thought, and big aspect is whether to choose between RAM and CPU. You don't actually have to choose which one you are going to use the most, you need to pick the best balance between those. It is the old question about speed vs efficiency.


I actually experienced why this is so important, because you simple want your RAM to be stable. Sometimes this gets overlooked while testing, as usually small files/queries are used in a testing environment. Once it is deployed on production with actual production data, one either gets `OutOfMemory` errors or is using nearly all the RAM.


For myself I use the following questions to keep a stable RAM:
* Do I need the complete file to be read in memory or can I process it line by line/ word by word?
* Could reading this file in memory result in exponential grow? (e.g. when an undetermined amount of files need to be read)
* Do I want to use this data later on?


I once wrote an application which used a 3 mb database and decided for some reason that I had to read it completely for each iteration. In that case I better could have loaded the whole database into RAM and use it over and over again, in stead of reading it over and over again. This resulted in an actual performance gain!


How do you manage to maintain a stable RAM?
The 7 Most Popular DEV Posts from the Past Week
Tags: top7
Published: 2017-08-21 14:05:21

---
title: The 7 Most Popular DEV Posts from the Past Week
published: true
description: A round up of the most-read and most-loved contributions from the community this past week.
tags: icymi
cover_image: https://thepracticaldev.s3.amazonaws.com/i/xsr1z6iqv0pd7p3s6ns3.png
---

_Every Monday we round up some of the last week's top posts, comments, and tweets. If you have any feedback, please leave a comment._ â¤ï¸

#1. New job, new codebase    

Which means more reading and less writing. Jason shares three practices to clean up code and improve readability. 

{% link https://dev.to/gonedark/writing-clean-code %}

#2. An argument for Electron

Electron, a popular framework that allows developers to write code once and deploy on multiple platforms like Mac, Windows, and Linux, has been under a state of steady attack over the past year. Pro-electron dev, Mo Bitar, defends Electron by diving into user perception and business cases. 

Warning: this topic got heated ðŸ”¥

{% link https://dev.to/bitario/in-defense-of-electron %}

#3. An attempt at benchmarking

The author of the Iris web framework uses the MVC architecture pattern to compare Go and .NET core. 


{% link https://dev.to/kataras/go-vsnet-core-in-terms-of-http-performance %}

#4. Getting meta

Everyone now and then, Ben writes a Meta post about dev.to -- this week it was about how our home page renders virtually instantly for all our users around the globe. 

{% link https://dev.to/ben/what-it-takes-to-render-a-complex-webapp-in-milliseconds %}

In the comments, we learned that Nigeria isn't getting as much internet love as it deserves. 

{% devcomment j03 %}

#5. Are you serious?

This week, Dattatraya writes a satire piece about the advantage of dirty code. Unfortunately, most people didn't catch the satire part and thought he was actually advocating for poor naming conventions and throwing shade at TDD. 

And now that you've been warned...

{% link https://dev.to/d4ttatraya/advantages-of-dirty-code %}

#6. Reading list

This list is directed at CTOs, but they're all really good reads for any entrepreneur or person working in software.

{% link https://dev.to/rogerjin12/top-10-books-every-cto-should-read %}

#7. A love for editors

A user shares his journey through different editors, and why. Which editors have _you_ outfitted?

{% link https://dev.to/nelruk/how-i-chose-my-code-editor %}

_That's it for our weekly wrapup! Keep an eye on dev.to this week for daily content and discussions...and if you miss anything, we'll be sure to recap it next Monday!_
Explain Actor concurrency model like I'm five
Tags: explainlikeimfive, discuss
Published: 2017-08-21 13:24:00

---
title: Explain Actor concurrency model like I'm five
published: true
description: 
tags: explainlikeimfive, discuss
---

There are tons of content about this topic, but they are usually dry and hard to grasp. Please explain like im five.
Data Migration
Tags: datamigration, architecture, development, discuss
Published: 2017-08-21 13:13:41

---
title: Data Migration
published: true
description: 
tags: Data Migration, Architecture, Development, Discuss
cover_image: https://preview.ibb.co/k5RXsQ/gnu_migration_dev_to.jpg
---

I'm about to start a new data migration project. It's kind of my thing at the moment. I'll basically have to migrate a data model from an Oracle 11g database to a different data model in an Oracle 12c database and somewhere in between will take into account all the business rules and surrounding application ecosystem with all its constraints and challenges.

In my previous project, we were migrating from and to 11g. We used PL/SQL to extract and perform some data preparation. The core data transformation was later performed in a C++ module, from which XML files were generated and finally imported. It was far from being a great solution; instead, it was basically some code rework from a past project.

What about you guys? I'm looking forward to knowing what kind of experiences you had with this kind of project!

Photo credit: renatela (https://www.flickr.com/photos/renatela/1069651852/) via [VisualHunt] (https://visualhunt.com/re/6c9922) / [CC BY-NC-ND] (http://creativecommons.org/licenses/by-nc-nd/2.0/)
Current technology trends. Will React Native solve all the challenges?
Tags: tech, reactnative, react, appdev
Published: 2017-08-21 12:38:46

---
layout: post
title: "Current technology trends. Will React Native solve all the challenges?"
published: true
tags: tech, reactnative, reactjs, appdev
cover_image: "https://thepracticaldev.s3.amazonaws.com/i/rtmi5zuswvubodup4a41.jpg"
---

To write code and build applications is rather challenging, so create apps for both platforms is even more complicated. There is a well-known fact and for years engineers have been trying to find the solution to the issue: “write once, run anywhere”.

Most cross-platform tools and technologies create a user interface themselves. That’s why it looks unnatural and doesn’t work fast.

Also, to build any complex application programmers should use not only a cross-platform framework but own language code too. Such code extensions and the use of framework often lead to some interaction problems.

“Write once, run anywhere” is a lifelong dream which resulted in the emergence of a plenty of different technologies created with an intention to make it come true: PhoneGap, Appcelerator Titanium, Java… But they didn’t manage to completely resolve it.

 

<b>A bit of React Native technology history</b>

Everything started with popular ReactJS, made by Facebook to repair their chat. Chat difficulties weren’t solved, but the technology was great and promising. 

The idea of putting interface from JavaScript cubes was so successful that Facebook decided to port the framework on mobile platforms, beginning with iOS (Android version appeared 6 months later, so iOS platform has more components). 

So, in the in the middle of 2015 Facebook released </span><a href="https://facebook.github.io/react-native/"><span style="font-weight: 400;">React Native</span></a><span style="font-weight: 400;"> and here I'll speak about this young and high-potential technology.

React Native is a JS framework based on JS and React, JS library for creating UI (of a View level). Though appearing not long ago, now it’s obviously one of the key trends of the mobile development world.

 

<b>The essence</b>

Putting the interface together from cubes and adaptive approach to design enable developers to make up interface semantically as it is in a web. Thus, instead of using different iOS and Android interface elements, a designer creates an interface from logical components such as header, button, list, screen, etc.

This is very convenient: at the beginning, you quickly make up the interface from universal blocks and then refine it for each platform where needed with ProgressBarAndroid and ProgressViewIOS. As you can see, the process is very similar to adaptive slicing.


Learn more about </span><a href="https://smartym.pro/blog/latest-technology-trends-will-react-native-solve-all-challenges/"><span style="font-weight: 400;">React Native benefits and ideas for improvement.</span></a><span style="font-weight: 400;">
My "RAD" stack for small projects
Published: 2017-08-21 11:29:56

---
title: My "RAD" stack for small projects
published: true
description: A software stack for handling small (web) projects 
tags: 
---

The last 10 years I work with Delphi & MS-SQL Server for building desktop apps and back-end systems in Windows. The last years I have considered some web-based projects but the distance from the tools I 'm familiar with to a decent stack for web apps is huge - sure I can build the back-end in Delphi but then deployment get's complicated, especially for small projects that do not worth setting app a complicated CI/CD tool chain. 

So I was in search for a more suitable stack, my requirements were more or less the following:

- Small set of new languages
- Easy setup of the development environment 
- Deployment options.

After some consideration I decided to go with the following stack:

- MS SQL Server
- Node.js
- HTML & Javascript

HTML & Javascript is a no-brainer, a website can target most of the devices that are used today.

Node.js was also an easy choice, it uses javascript so I can leverage what ever I learn for the front-end, and is popular enough to be deployable in almost all cloud platforms as well as both in Apache & IIS and both under Windows and Linux. Also as it is a new, hot technology there are a lot of guides and has a very active community. Setting up the developing environment is also very simple.

MS SQL Server is a rather strange choice but in my case it has some advantages, first of all it's a tool that I'm familiar with, I have it already available in my dev machines and I can re-use a lot of tooling that I have available. There also many options for deploying MS SQL Server (Managed in Azure, unmanaged in Google Cloud, Local installation in windows & linux)

This stack allows me to develop and deploy either to my dev-machine or completely managed in azure. 

Sure some tools of this stack may not be optimal for large-scale web projects but the issue of this post is to describe a stack for small projects which may or may-not move forward to become large-scale enough...
Suggestions for learning more Java
Tags: java, api, webdev, discuss
Published: 2017-08-20 22:39:33

---
title: Suggestions for learning more Java
published: true
description: Looking for guidance about Java
tags: Java, API, Web-development, discuss 
---

Hello all, I've been interested in Java lately. I feel like I have a good grasp on the basics of the language as well as object oriented programing in general, but have been having difficulty figuring out where to look to learn more about building things with Java. Specifically I'm looking to learn how to build Web Services/API's with Java. Any suggestions on books, tutorials, frameworks, etc I should look into.
Internet censorship device
Tags: censorship, rights, arduino, python
Published: 2017-08-20 20:34:53

---
title: Internet censorship device
published: true
description: An arduino project to protest against internet censorship
tags: censorship, rights, arduino, python
---

I spent my day in creating an arduino toy I want to use in an incoming speech I'll give in a sec convention, about internet censorship.

Internet censorship is a huge problem, and several associations and ngo's are fighting against it, such as the **Electronic Frontier Foundation** , Reporters sans frontiers, TOR, and others. But sometimes, in our comfortable position as a regular user (and even tho suffering surveillance and such) we forget about other countries, that block the access to sites such as facebook, twitter, wikipedia and others. 

This device I created today, uses a simple rgb led in arduino connected o a python script, which reads bro.org tool for network scanning logs in order to turn on a red led when the users in the network being scanned by bro log in this kind of sites that are becoming a "privilege". This won't stop anything, but might make us realise our huge luck and that situation shouldn't be like that. 

In [this](https://github.com/terceranexus6/wearefucked_device) repository you can find a very easy version of the program, implemented in Linux, completely open for you to copy, improve or read.
What Are Your Top Three Conference Talks?
Tags: discuss, learning, conferences, talks
Published: 2017-08-20 12:26:15

---
title: What Are Your Top Three Conference Talks?
published: true
tags: discuss,learning,conferences,talks
---

I start off with these masterpieces:

* [Brian Fitzpatrick and Ben Collins-Sussman (Google I/O 2009): The Myth of the "Genius Programmer"](https://youtu.be/0SARbwvhupQ)
* [Bret Victor (DBX 2013): The Future of Programming](https://youtu.be/8pTEmbeENF4)
* [Rich Hickey (Strange Loop 2011): Simple Made Easy](https://www.infoq.com/presentations/Simple-Made-Easy)

What are yours?
When to TDD (Test Driven Develop), a Newbie’s Story
Tags: rspec, newbie, tdd
Published: 2017-08-20 04:18:41

---
title: When to TDD (Test Driven Develop), a Newbie’s Story
published: true
description: I used TDD when I created my capstone. This is what I learned.
tags: RSpec, Newbie, TDD
---
I just finished my Actualize coding bootcamp which culminated in a capstone project. After a while of struggling through my heavy backend code we learned about TDD (I know it’s Test-Driven Development, I was using the verb form in the tittle).
I was completely stuck on my capstone project when we had our TDD class. I had been coding for hours on the weekends completely in the weeds of huge Rails model methods and, of course, nothing was working. At first TDD looked like a pretty dumb way to do twice the work, but as we went through the dumb seeming exercises in class, it was as if the clouds parted and the angels started to sing, “Do this in your capstone…ah ah AH!”
Hopefully you have that image set squarely in your mind. In truth there are definite positives and negatives to TDD but for those of you out there who have no idea what TDD even is, this article is for you.
#The Pro’s of TDD
I wont go into a lot of detail about what TDD is, and I only have real experience in Ruby on Rails using RSpec, but here are the basics. TDD is basically when you write the tests for the code before you start and then you code incrementally.
The idea is you write a test, starting as simple as possible, and write code to pass the test. Then you write another test, just a small step more complicated than the last, and write code to pass that test. As you go, you build out your tests just as you build out your code. You then have a permanent array of tests you can run every time you make a change in your code.
The main pro, is you write code that you know works and you catch your mistakes as you go. If I were to try and debug my code, I would have had to go through every element that could be the weak link and test it out. In my experience, the code I was most suspicious of was code that I hadn’t used before. It would take a lot of time and effort to debug my active record queries for example. Instead I rewrote my code using TDD and I was able to have much more confidence in those model methods.
#The Cons of TDD
Though it was all worthwhile, I found that TDD worked great with methods that calculated some number or created/destroyed an object. It didn’t work as well recognizing dates or checking that specific routes worked. These were things that I probably could have figured out how to do in RSpec but they also weren’t hard to test just by doing them in the app and checking the result. They also weren’t the things that had been breaking before. In other words, there is a cost benefit analysis you have to do when deciding to use TDD. It does take a lot of work and there are many things that just aren’t worth it.
In the end, TDD really helped me to understand what my code was doing and made it more robust. I would recommend looking into it more, and trying it if you are stuck. I also wouldn’t recommend blindly implementing it just for fun, but that’s just me.
A weekend, a Rails app, a Kubernetes and an Azure.
Tags: docker, kubernetes, rails, azure
Published: 2018-02-04 00:22:57

---
title: "A weekend, a Rails app, a Kubernetes and an Azure."
published: true
tags: docker, kubernetes, rails, Azure
canonical_url: https://michiels.io/2017/08/20/a-weekend-a-rails-app-a-kubernetes-and-an-azure.html
---

This weekend, I’ve been exploring the depths of Kubernetes and Azure, to see if we can host Ruby on Rails with them. Kubernetes is an open-source system for automating deployment, scaling, and management of containerized applications. And Azure is a cloud infrastructure provider by Microsoft.

[Read the post on my Medium](https://medium.com/@michiels/a-weekend-a-rails-app-a-kubernetes-and-an-azure-d330b003d7c2)
Getting your head around Chrome headless
Published: 2017-08-17 19:09:42

---
title: Getting your head around Chrome headless
published: true
description: Trying to make sense of all the new automation frameworks.
---

![Lost it's head](https://thepracticaldev.s3.amazonaws.com/i/5x4e1iqbn4rrpn65uw9z.png)

A slew of new automation “stuff has just arrived due to [Chrome’s new headless feature in v59](https://developers.google.com/web/updates/2017/04/headless-chrome). As creator of [snaptest.io](https://www.snaptest.io), it’s my job to stay up-to-date with them.

***So here’s what you need toÂ know:***

A headless browser means you don’t see it open when you start it, it’s all in memoryâ€Š–â€Šand it also implies user actions are automated.
Uses of ***automation***:
- QA tests
- Scraping
- Pre-rendering single-page apps.

Uses of ***headless***:
- Less resource intensive.
- Great for build-systems running tests before a deploy.
- Can run in many more server environments, like Lambda.

***Is this the first headless automated browser?*** No, phantomJS has been the goto browser like this, but the main contributor almost immediately [stepped down when he heard about Chrome’s new headless feature](https://groups.google.com/forum/#!topic/phantomjs/9aI5d-LDuNE)Â . Turns out its hard to maintain an ENTIRE browser.

### So what’s actually new in ChromeÂ v59?
- running the executable like this: `chromeâ€Š–â€Šheadlessâ€Š–â€Šdisable-gpuâ€Š–â€Šremote-debugging-port=9222` which opens it without a visible window.
- then sending commands to the above port… closest to the metal node library is [this one](https://www.npmjs.com/package/chrome-remote-interface)Â .
- the above commands give you ability to do almost anything a user would do… so you can scrape data or make tests.

### The community is responding

The community has decided that we need a pretty wrapper around this “low level stuff, and have started making these:
- [Chromeless](https://github.com/graphcool/chromeless) (a combination of the words “Chrome and “Headless and maybe even “Serverless”).
- [Puppeteer](https://github.com/GoogleChrome/puppeteer) (Googles very own “lightweight wrapper”)
- [Simple-headless-chrome](https://github.com/LucianoGanga/simple-headless-chrome) (another wrapper)
Probably many more to come!

### Conclusion:
What’s the state of each of these frameworks? Let’s find out in a couple months once they’ve grown up a bit. Comparing and contrasting right now would be a practice in futility.
Rational Operationalization
Tags: support, automation, operations
Published: 2017-08-19 14:38:57

---
title: Rational Operationalization
published: true
description: 
tags: support, automation, operations
cover_image: http://i65.tinypic.com/312ztxg.jpg
---

_This post was originally published [here] (https://partitionbyblog.wordpress.com/2017/08/19/rational-operationalization/)._

My first contact with support happened early in my career. I was part of a team that, amid other jobs, would operationalize procedures for an operations team to execute. It didn't take long to realize that the lower the automation level, the higher the probability for the operations team make a mistake. Several factors contributed to this:

1. The operations team worked in shifts, 24x7, and always with a high churn rate (there was always someone leaving or joining the team);
2. This team's elements had lower qualifications and a low knowledge of the business or its rules (they weren't supposed to);
3. The operations team executed procedures from several support teams (my team was just one among many), and therefore they didn't know the procedures in detail, how they were implemented or what were they for;
4. The procedures with the higher number of steps and actions to perform were far more error prone and to address this point, automation was essential;
5. The way the procedures were implemented and made available to the operations team had a correlation with the number of errors recorded, for example: to execute a script through a command line is more complex than to execute the exact same script by clicking a button in some dashboard; to send an email with a short description of the procedure isn't the same as making available an operational manual for the same procedure;

No less important here was our posture towards who made the mistake. In an initial stage, we almost only placed the blame in the operations team. Fortunately, we didn't take long to realize that wasn't the right way. Instead we made the only logical decision: to understand why the error had occurred (and hey, lots of times it was our problem!), how to correct it, to effectively correct it and, last but not least, to pass and explain the changes to the operations team so that they may execute the procedure properly.

Nowadays the errors still occur and they will keep occurring in the future but they are less frequent and we face them in a perspective of continuous improvement.

Photo credit: [Armando G Alonso ✈︎] (https://www.flickr.com/photos/argonavigo/5320119828/) via [VisualHunt] (https://visualhunt.com/re/fb1f6a) / [CC BY-NC-SA] (http://creativecommons.org/licenses/by-nc-sa/2.0/)
after reading “You Might Not Need Redux”
Tags: redux, ddd, react
Published: 2017-12-21 13:44:02

---
title: "after reading “You Might Not Need Redux”"
published: true
tags: redux,ddd,react
canonical_url: 
---

 **You Might Not Need Redux** is a dan\_abramov’s(redux author)&nbsp;post.

[You Might Not Need Redux](https://medium.com/@dan_abramov/you-might-not-need-redux-be46360cf367)

I have a server-side development background, so i’ve been learning DDD.  
In my opinion, Redux architecture seems to contain Event-Sourcing and&nbsp;CQRS.

React component inevitably includes only fundamental domain concerns,

- **what happened?**
- **What data is presentation?**

I think redux Encouraging DDD essence.