teleren/devto huggingface dataset:
What is your ideal coding hour?
Tags: discuss
Published: 2018-08-10 12:01:00

---
title: What is your ideal coding hour?
published: true
description: Coding habits
tags: #discuss
---

As a Software Quality Assurance by day and Software Engineering student at night, I have my difficulties trying to improve my coding skills during the day. Having a job, studying, (beautiful) girlfriend, family and friends, I sometimes struggle when I want to take a moment for me to code. While reading one of the posts here at Dev.to I found someone that recommended to wake up 1 hour earlier in the morning to do what i wanted, and that really helped... until I had so much homework to do that... well, I wanted to sleep at least 5 hours. 

For motivation purposes I've been thinking on building a birthday webpage for my girlfriend's birthday during the #100DaysOfCode challenge that I recently get to know about

So I came up with this question for you all!, What is the best moment for you to code (you can add any ritual you do for preparation <('-'<) (>'-')> ).

![](https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSjw_tqwcUoum1XKRCsguoOGZHkyQV8buIXgpwbUTMrbofkCnQ-)
Just Code Challenge: JumpStart App Launcher
Tags: challenge, xojo, learning, atari
Published: 2018-08-10 13:21:07

---
title: Just Code Challenge: JumpStart App Launcher
published: true
description: 
tags: #Challenge, Xojo, Learning, Atari
---

A long, long time ago (1989) one of the first apps I ever made was an app launcher for the Atari ST. I called it JumpSTART. I originally wrote it in GFA BASIC and then later re-implemented it in Pascal (OSS Personal Pascal, technically).

When I got my first modem I went online with Genie and Delphi and uploaded JumpSTART as freeware. Even though it was freeware, I got a few checks in the mail from people that liked it.

I was reminded of JumpSTART when I saw my dock getting crowed. I thought replicating JumpSTART in Xojo would be a good project for week 8 of #JustCode. Though let’s just call it JumpStart this time around.


This is what JumpSTART looked like on monochrome 640×480 screen:

![](https://blog.xojo.com/wp-content/uploads/2018/08/2018-08-09_14-06-09.png)

JumpStart in Xojo is greatly simplified and looks like this:

![](https://blog.xojo.com/wp-content/uploads/2018/08/2018-08-09_14-10-06.png)

The Xojo version automatically saves and loads the apps you’ve added so there was no need for separate Load/Save, Re-Read buttons. Technically they don’t have to be apps as even a document file can be launched as well.

You can right-click on an app button after you’ve added it to Rename, Change or Clear it so that also removed the need for some UI controls. And you just click on an empty button to add an app to it. When you click on a button with an app assigned, the app is launched and JumpStart hides itself.

This Xojo app demonstrates the use of a Canvas-based button, ContainerControls added dynamically to a window, and saving/loading JSON. The Canvas-based button will let me tweak the display, colors and maybe display an icon there.

You can [check out the project on GitLab](https://gitlab.com/xojo/JumpStart).

As an added code treat, I’ve posted my [original JumpSTart Pascal code to GitHub](https://github.com/paullefebvre/JumpSTART-AtariST). FWIW, the original Pascal source is just over 1300 lines of code. The Xojo version is about 180.

Add your #JustCode project to the [week 8 forum conversation](https://forum.xojo.com/49298-just-code-challenge-week-8-projects).
Demystifying vim
Tags: discuss, vim, tutorial
Published: 2018-08-10 12:24:07

---
title: Demystifying vim
published: true
description: as long as you don't exit vim you'll live
tags: discuss,vim,tutorial
---

Before I start, just remember, when in doubt just don't close vim and you'll live.

## Exiting Vim

It's easier said than done for some, there's countless articles asking for help, here's a shortcut:

### Intent: Write and Quit

If you intend to write and quit (save changes, exit), you should follow this key bindings: 

1. ESCAPE
2. :
3. wq
4. ENTER

### Intent: Write, but don't quit

If you intend to write and don't quit, simply run:

1. ESCAPE
2. :
3. w
4. ENTER

## Editing content

You can either use the `i` key, or hit `insert` to write content in vim. If you hit `r` or double hit `insert`, it will open the replace mode.

## Undo, anyone?

In order to undo, make sure you're not in write mode (hit escape), and hit the `U` key until satisfied. 

## Can I redo it?

Yep, `r` until satisfied.

## How the heck can I fix the indentation?

A little opinionated, but if you run this command then hit F7, it'll format your code in an opinionated way:

1. ESCAPE
2. :map <F7> mzgg=G`z
3. ENTER
4. [KEY:F7]

## That's all for now!

This should get you by using vim in it's most basic format!
Out of everything you've seen or read, what had the biggest impact on your life as a developer?
Tags: discuss, askdev, impact, motivation
Published: 2018-08-10 12:03:56

---
title: Out of everything you've seen or read, what had the biggest impact on your life as a developer?
published: true
description: Was it a book? Video? Course? What made you know development is for you?
tags: discuss,askdev,impact,motivation
---

Out of every single thing you've seen or read, listened or watched, or even people you've talked to, which had the biggest impact on you and why did it have this impact on you?
What are your opinions of fudgeability in software design?
Tags: design, software, discuss
Published: 2018-08-10 11:01:13

---
title: What are your opinions of fudgeability in software design?
published: true
description: 
tags: design, software, discuss
---

Alan Cooper writes in "About Face": 

> _The characteristics of manual systems that lets humans perform actions out of sequence or before prerequisites are satisfied is called fudgeability._

One example he mentions is _"a transaction that can only complete if the termination date is extended two weeks beyond the official limit. Most companies would rather fudge on the termination date than to see a million dollar deal go up in smoke'_

What do you think about software systems being "fudgeable"?

On the one hand I think it can improve the user experience quite a bit, on the other hand we finally have some systems in place that force people to play by the rules and this would make them as bad as the manual version.
Magento 2 FAQ Module by FMEextensions    
Tags: magento2faqmodule, magento2faqextension, magento2faqs
Published: 2018-08-10 10:31:22

---
title: Magento 2 FAQ Module by FMEextensions    
published: true    
description: 
tags: Magento 2 FAQ module, Magento 2 faq extension, Magento 2 FAQs
---
Providing answers to frequently asked questions is important particularly if it's an online store. Customers may have got many questions related to products, shipping, refund policy etc. Until they get clear answers to their questions and remove their ambiguities, they are not going to make purchases on the store. One way to get their questions answered is to have them contact the customer support department. This method is time consuming and generally not preferred by customers. 

An easier way is to list all the possible FAQs on the product or dedicated FAQ page and provide answers to them. Customers can search for their specific FAQ without having to contact the support team. 

With [Magento 2 FAQ module](https://www.fmeextensions.com/advance-faq-module-magento-2.html) by FMEextensions, you can add product related FAQs on the product page. It also allows you to create a separate FAQ page. To make search and navigation easier, you can divide the FAQs in different categories/topics and enable the search feature.  Using FAQ block,you can display FAQs anywhere on a page. 

###Main Features of Magento 2 FAQ Extension


- Create unlimited FAQs & display them on product page
- Create a dedicated FAQs page
- Display FAQs in accordion style
- Divide FAQs in topics
- Import/Export FAQs
- Use FAQ block
- SEO friendly
Save lives with WebGL
Tags: webgl, opengl, cinematicrendering, help
Published: 2018-08-10 10:21:25

---
title: Save lives with WebGL
published: true
description: Anybody interested saving lives by making photo-realistic rendering of medical data?
tags: webgl, opengl, cinematic rendering, help
cover_image: https://thepracticaldev.s3.amazonaws.com/i/cd89m8nvmb1x8r8ufbps.gif
---

*Images are courtesy of [1] - Evelyn DappaKai HigashigaitoJürgen FornaroSebastian LeschkaSimon WildermuthHatem Alkadhi - Cinematic rendering – an alternative to volume rendering for 3D computed tomography imaging

I'm looking for WebGL / OpenGL / Passionate folks who could help me implement cinematic volume rendering in WebGL.

This project aims to provide real life like visualization of medical data.

<img src="https://thepracticaldev.s3.amazonaws.com/i/cd89m8nvmb1x8r8ufbps.gif"/>
[Left cinematic rendering / right volume rendering - image from [1]]

I've implemented some classic volume rendering and I'd like to take it to the next level. However I think my volume rendering implementation is already a bit clumsy so cinematic rendering may be too much of a challenge.

Currently at https://github.com/FNNDSC/ami:
<img src="https://thepracticaldev.s3.amazonaws.com/i/pg87qqjujvft0uzlnb5h.png"/>

Any directions, help, suggestion would be awesome!

Refs:

[1] - Cinematic rendering – an alternative to volume rendering for 3D computed tomography imaging - https://link.springer.com/article/10.1007/s13244-016-0518-1
Do you use the Pomodoro Technique?
Tags: discuss, tools, terminal
Published: 2018-08-10 09:51:01

---
title: Do you use the Pomodoro Technique?
published: true
description: Do you use the Pomodoro Technique? I did it using the terminal on Linux. It allows me to not installed any app that would make my computer full of apps that can be easily replaced by a terminal command.
tags: discussion, tools, terminal
---

Hi everyone,

I am wondering if some of you uses the **Pomodoro technique** from time to time, or frequently, in order to improve your focus and then you productivity.

---

Here is a good video that explains what it is of you don't know what is the Pomodoro technique.
{% youtube mNBmG24djoY %}

I was using this technique earlier and stopped for a while.
But as I wanted to use it again, I came quickly at looking for a good app that does simple Pomodoro for Linux.
Unfortunately every app around here is either full of setup and features or requires Java or something similar that I don't want to install on my computer.

Then I come with a good idea about it ;-)
> "*why can't I just use the terminal to set up a timer in the terminal that sends a notification when it has ended?*"

As always, pretty easy with the terminal.

---

#### 1. Step 1 - Start the 25 minutes work session
```bash
sleep 1500 && notify-send "Your pomodoro session just ended. Have a well deserved 5 minutes break"
```
1500 seconds are 25 minutes. Then the terminal will display a notification that says "*Your pomodoro session just ended. Have a well deserved 5 minutes break*"

#### 2. Step 2 - Start the well deserved, guilt free break
```bash
sleep 300 && notify-send "Back to work"  # a short, 5-minute break
```

---
#### 3. Step 3 - Improvement
But, you can also do both launch timer and break timer at once.
```bash
sleep 1500 && notify-send "Your pomodoro session just ended. Have a well deserved 5 minutes break"; sleep 300 && notify-send "Back to work"
```

---
#### 4. Step 4 - Alias (I am a lazy person ;-) )
Add this to your alias file 
```shell
pomodorostrt='sleep 1500 && notify-send "Your pomodoro session just ended. Have a well deserved 5 minutes break"'
pomodorobrk='sleep 300 && notify-send "Back to work"'
pomodoro='sleep 1500 && notify-send "Your pomodoro session just ended. Have a well deserved 5 minutes break"; sleep 300 && notify-send "Back to work"'
```
> You can change the alias to something shorter. But as I have the autocompletion, I prefer to make it clear. :-)

And then you can just type either `pomodorostrt` or `pomodorosbrk` to start the **work session** or the **break** or `pomodoro` to launch a complete **Pomodoro session**.

---
#### Another Improvement
You can use zenity (`man zenity` for further explanation) to have a more sticky notification.
```bash
sleep 1500 && zenity --warning --text="25 minutes passed"
```

---

*So do you think you can use the terminal to improve you productivity?
Do you use the pomodoro technique and do you think that it has improve your productivity or focus at some point?
Are you using any other time-management technique?*
I'd rather you did not ...
Tags: cpp, programming, security
Published: 2018-08-10 09:42:17

---
title: I'd rather you did not ...
published: true
description: 
tags: cpp, programming, security
cover_image: https://www.microsoft.com/en-us/security-risk-detection/wp-content/uploads/sites/4/2017/05/MS_SRD_Feature3_800x450.png
---

Here goes a little gem: [Secure Programming Practices in C++](https://vimeo.com/283693861)


The main takeaway - is a list of "I'd rather you did not":
1.	Use C
2.	Allocate with new
3.	Do math a lot
4.	Trust your external input
5.	Use pointers a lot (since they have no semantics!)
6.	Write “clever” code
7.	Use shared_ptr a lot
8.	Use share state a lot

Enjoy!

P.S.
For the curious students: [C++ Core guidlines] (https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md)
Friday Blast #48
Tags: fridayblast, links, post
Published: 2019-01-20 15:26:23

---
title: Friday Blast #48
published: true
tags: friday_blast,links,post
canonical_url: https://horia141.com/friday-blast-48.html
series: "Friday Blast"
---

[Programming in the adult entertainment industry is broken (2018)](https://dev.to/jwoertink/programming-in-the-adult-entertainment-industry-is-broken-hgn) - fun read about all the broken stuff in the _adult entertainment industry_. The root of the issue is that _payments are hard_ when there is a very high percentage of refunds.

[How to upper-bound the probability of something bad (2018)](https://www.scottaaronson.com/blog/?p=3712) - this is mostly useful for people who need to write proofs as part of their day to day work. Still, it’s a good refresher for some _normal techniques_ (Markov’s Inequality, Chebyshev’s Inequality etc), which one might find in non-advanced texts. I also find it a good peek into the mind of somebody doing high-level research. And even they have to look stuff up on Wikipedia :)

[Enhancing the quality of Uber’s maps with metrics computation (2018)](https://eng.uber.com/maps-metrics-computation/) - this is something quite relevant to the sort of stuff we do at Taxify (btw, [we’re hiring](https://taxify.eu/careers/)), and for many issues Uber [already did it](https://knowyourmeme.com/memes/the-simpsons-did-it). The base idea is how to ensure that the geographic data used is actually _high quality_ and corresponds to _reality_. A lot of nifty data processing is used for this.

[An introduction to hashing in the era of machine learning (2018)](https://blog.bradfieldcs.com/an-introduction-to-hashing-in-the-era-of-machine-learning-6039394549b0) - some time ago a nice paper from Google and MIT circulated where they “learned” an index structure for database access, which was competitive with B-Trees and their variants. This was somehow expected (apply ML to everything!), but from another POV it came out of the blue. That’s CS101 stuff right there - the stuff which is supposed to be airtight - well understood problems, good algorithms, theorems etc. None of that pesky _perception_ or _reasoning_ stuff. And here ML was _competing with it_. Big news and a lot of people got excited. The present article deals with how _hashing_ would be affected, given that it’s also the same sort of _lookup problem_ ML was good at attacking. The bottom line was that learning to hash is good, but Cuckoo hashing is better. Still, super nice read.

[Becoming a dramatically better programmer (2017)](https://recurse.henrystanley.com/post/better/) - sage advice and some directly applicable skills. In my view, the biggest thing is a mindset of _trying to become better_ and holding yourself accountable to that, rather than coasting along. After that, each person will have their own way of doing things. Biggest thing here is how good _deep work_ really is. I _need_ to get to _Deep Work - The Book_ at some point as well.
Receive Data without $_GET,$_POST AND $_REQUEST
Tags: php
Published: 2018-08-10 06:27:40

---
title: Receive Data without $_GET,$_POST AND $_REQUEST
published: true
description: 
tags: php
---

In php there is also method or functionality  which can be used to receive data without GET,POST and REQUEST.


Which is 

```
$input_date_from_client = file_get_contents('php://input');

```
Semantic Versioning using npm
Tags: node, javascript
Published: 2018-08-06 05:25:11

---
title: Semantic Versioning using npm
published: true
tags: node, nodejs, node.js, javascript
canonical_url: https://flaviocopes.com/npm-semantic-versioning/
---

If there’s one great thing in Node.js packages, is that all agreed on using Semantic Versioning for their version numbering.

The Semantic Versioning concept is simple: all versions have 3 digits: `x.y.z`.

- the first digit is the major version
- the second digit is the minor version
- the third digit is the patch version

When you make a new release, you don’t just up a number as you please, but you have rules:

- you up the major version when you make incompatible API changes
- you up the minor version when you add functionality in a backwards-compatible manner
- you up the patch version when you make backwards-compatible bug fixes

The convention is adopted all across programming languages, and it is very important that every `npm` package adheres to it, because the whole system depends on that.

Why is that so important?

Because `npm` set some rules we can use in the [`package.json` file](https://flaviocopes.com/package-json/) to choose which versions it can update our packages to, when we run `npm update`.

The rules use those symbols:

- `^`
- `~`
- `>`
- `>=`
- `<`
- `<=`
- `=`
- `-`
- `||`

Let’s see those rules in details:

- `^`: if you write `^0.13.0`, when running `npm update` it can update to patch and minor releases: `0.13.1`, `0.14.0` and so on.
- `~`: if you write `~0.13.0`, when running `npm update` it can update to patch releases: `0.13.1` is ok, but `0.14.0` is not.
- `>`: you accept any version higher than the one you specify
- `>=`: you accept any version equal or higher than the one you specify
- `<=`: you accept any version equal or lower to the one you specify
- `<`: you accept any version lower to the one you specify
- `=`: you accept that exact version
- `-`: you accept a range of versions. Example: `2.1.0 - 2.6.2`
- `||`: you combine sets. Example: `< 2.1 || > 2.6`

You can combine some of those notations, for example use `1.0.0 || >=1.1.0 <1.2.0` to either use 1.0.0 or one release from 1.1.0 up, but lower than 1.2.0.

There are other rules, too:

- no symbol: you accept only that specific version you specify (`1.2.1`)
- `latest`: you want to use the latest version available
How do you convince a client to a static website?
Tags: discuss, webdev, devtips
Published: 2018-08-10 06:18:41

---
title: How do you convince a client to a static website?
published: true
description: How do you convince a client to a static website? What are your favorite players? Do you have any tricks or tips you want to share?
tags: 
- discuss
- webdev
- devtips
---

![Cover image — Generator](https://thepracticaldev.s3.amazonaws.com/i/vxnla37a3fcagam7q20i.jpg)

[JAMstack is cool](https://jamstack.org/). If you haven't heard of [Static Page Generators](https://www.staticgen.com/) and [Headless CMS](https://headlesscms.org/) yet, now's the time.

However, if you are familiar with it, and you know how to use them, then I need your opinion and help.

How do you convince a client to a static website?
What are your favorite players?
Do you have any tricks or tips you want to share?
I hate checked exceptions
Tags: javaexceptions
Published: 2018-08-10 06:15:43

---
title: I hate checked exceptions
published: true
description: A rant about Java checked exceptions
tags: java exceptions
---

I hate checked exceptions. I really do. They should have really got rid of them in Java 8. They get in the way of a lot of the new stuff; it's not a coincidence that most of the other JVM languages don't have checked exceptions.

`BEGIN RANT`

I have a class in which I'm overriding an abstract method:

```java
@Override
protected Runnable createTask(Request req) {
  Response resp = new Response(Errors.CANT_CONNECT);
  if (req.getType() == Request.Something) {
    return () -> {
      try {
        oneThing(req, resp);
      } catch (IOException ex) {
        log.error("Doing something with {}", req, ex);
      } finally {
        process(resp);
      }
    };
  } else if (req.getType() == Request.SomethingElse) {
    return () -> {
      try {
        somethingElse(req, resp);
      } catch (IOException ex) {
        log.error("doing something else with {}", req, ex);
      } finally {
        process(resp);
      }
    };
  } else if (req.getType() == Request.YetAnotherThing) {
    return () -> {
      try {
        anotherThing(req, resp);
      } catch (IOException ex) {
        log.error("Doing yet another thing with {}", req, ex);
      } finally {
        process(resp);
      }
    };
  }
  return null;
}
```

As you can see, it's very repetitive. A block is code is basically repeated 3 times with just a very small variation. An obvious opportunity to put it elsewhere, right? Something like this looks way nicer:

```java
private Runnable execute(BiConsumer<Request, Response> m,
        Request req, String msg) {
  Response resp = new Response(Errores.CANT_CONNECT);
  return () -> {
    try {
      m.accept(req, resp);
    } catch (IOException ex) {
      log.error(msg, ex);
    } finally {
      process(resp);
    }
  };
}

@Override
public Runnable createTask(Request req) {
  if (req.getType() == Request.Something) {
    return ejecutar(this::oneThing, req, "Doing something with {}");
  } else if (req.getType() == Request.SomethingElse) {
    return ejecutar(this::somethingElse, req, "doing something else with {}");
  } else if (req.getType() == Request.YetAnotherThing) {
    return ejecutar(this::anotherThing, req, "Doing yet another thing with {}");
  }
  return null;
}
```

Way nicer. Yeah.

Except I can't do this. Why not? Well, `BiConsumer` doesn't throw `IOException`, therefore I can't catch it. Also, I can't pass refs to my methods because they throw `IOException`.

In order to do this, I need to catch `IOException` inside *each* of my methods, only to convert it into a `RuntimeException`, which I can then catch in `execute`.

I really don't want to do that right now. So... ⌘+Z ⌘+Z ⌘+Z ⌘+Z ⌘+Z ⌘+Z ⌘+Z ⌘+Z ⌘+Z ⌘+Z

`END RANT`
What are your favorite DevOps tools?
Tags: devops, ci, cd
Published: 2018-08-10 06:13:56

---
title: What are your favorite DevOps tools?
published: true
description: share your favorite DevOps tools. 
tags: devops, ci,cd
---

DevOps is the need today. 
Doing DevOps the right way starts with the right thinking approach. Figuring out the critical processes that you can automate easily. 

Even though DevOps may start with the culture but ultimately you need tools to make things work.

![6 Cs of DevOps](https://thepracticaldev.s3.amazonaws.com/i/4uaoyv2vt8p2md7ghr9m.png)


My favorite tools when it comes to DevOps are,
[Docker](https://www.docker.com/) 
[AWS](aws.amazon.com)
[GitHub](https://github.com/)
[Terraform](https://www.terraform.io/)
[Ansible](https://www.ansible.com/)
[Splunk](https://www.splunk.com/)
[Monit](https://mmonit.com/monit/)
[Shippable](https://www.shippable.com/)
[Chef](https://www.chef.io/chef/)
[Slack](https://slack.com/)

Share yours:)