teleren/devto huggingface dataset:
How readable is using pseudo-code instead of normal human language?
Tags: beginners, askdev, discuss
Published: 2019-07-21 13:40:52

---
title: How readable is using pseudo-code instead of normal human language?
published: true
description: I am horrible at human language. May I use pseudo-code instead?
tags: beginner, askDev, discuss
cover_image: https://images.unsplash.com/photo-1555424681-b0ecf4fe19a5
---

Honestly, human language is my [Kryptonite](https://en.wikipedia.org/wiki/Kryptonite).
I am not an English native speaker, however, to be fair, I am horrible in my mother tongue as well.

I am horrible at both verbal communication and text-based comm.
By all means, I am not good at programming languages, though, I feel it more comfortable to both write and read, for me.
I find that in this way, I can write more clearly structured text.

However, I'm aware that I'm usually out or average, and often kinda a weirdo.
Therefore, I wanted to know how others feel when saw it.
Even though standard pseudo might be the better way to do this, I just feel comfortable when I use Java, so I mostly do this in pseudo-Java way.



---



examples:

1. a mention I just twitted this morning
(btw, congratulation🍾👏🎉 again, @emmawedekind !
sorry for using the tweet to you as an example.
I was too tired after an extended vacation to find something else. ☹️🥺)

  {% tweet 1152821893956812805 %}



2. email to my school friend
  ```java
    /* postscript. I almost forgot it. I registered in a ****** in *** about AI.
      I honestly know barely anything about it.
      But I recently tried some tech events and all the talks were easier to follow then I was worried. */
    If (You are willing to) 
        { join me. }
    Else If (you (don't want to) || (can't) join but still interested) 
        { I can share my summary later. }
    Else If (you (don't want to go) && (are not interested)) 
        { just ignore this ps. }
  ```



---



**My question** for Java dev    // tempted to use `forEach()` 😝
                   | non-Java dev
                   | non-dev (to be fair, I don't use it for absolute non-dev):
1. How much does it readable?
2. Do you find it ( weird | unpleasant ) in any way?

 
  {% tweet 1152943261667012610 %}
  I also made a poll👆 on twitter.
  Please comment on the post or/and join the poll.
  Help me to be a better communicator. 🙏
  Thank you in advance!
Be wary of how proofs of concept can sneak into production
Tags: tactical, protip
Published: 2019-07-31 13:37:53

---
title: Be wary of how proofs of concept can sneak into production
published: true
tags: tactical,protip
canonical_url: https://www.simplecto.com/be-wary-of-how-proofs-of-concept-can-sneak-into-production/
---

 ![Be wary of how proofs of concept can sneak into production](https://www.simplecto.com/content/images/2019/07/be-wary-of-proofs-of-concept.png)

CTO Protip.

This one is VERY tactical.

Be vigilant of what and to whom you have shipped proofs of concept.

Once upon a time, in a land far, far away, I shipped some code for a customer demo. It was exactly what my sales guy has been asking for. He was excited.   

I thought, "Great!" and just considered it done. I ASSUMED that sales would come back to me with timelines and details so that I could put it on the product roadmap for integration into our larger suite of products.  

NOPE.   That is not what happened.

About a month later we started getting support-related email from a new customer. It was only then I realized what had happened.   We had sold a proof of concept to an important customer, but none of our quality controls were in place.   

- No error tracking 
- No backups 
- No real security   

The fault was mine.

1. I did not communicate with my sales guy what the ground rules were for demos
2. I did not have a template for delivering proofs-of-concept to sales and product managers.

In the end it worked out. We finally built the features properly and then transition the customer over.   

**Lessons learned** : have a process in place for exploring ideas. And set expectations appropriately with your sales, support, and customers.  

No more ad-hoc PoCs!
Read the React Hooks docs (again)
Tags: react, reacthooks
Published: 2019-07-21 13:18:21

---
title: Read the React Hooks docs (again)
published: true
description: The docs are awesome, and they've been improving
tags: react, react hooks
---

I was reading [the React Hooks docs](https://reactjs.org/hooks) again yesterday and noticed that they've improved since the last time I reviewed them. I get a lot of questions from people about React Hooks, (and understandably so, there's a bit of a learning curve) and so many of the questions are answered in the React Hooks documentation (especially [the FAQ](https://reactjs.org/docs/hooks-faq.html)) or by searching "hook" on [my blog](https://kcd.im/search).

So if it's been a while, give the docs another look. You'll definitely learn something new! Then come back here and comment on what it was you learned 😉 let's learn together.
Webdevelopment for Beginners 01 - How to get started
Tags: html, beginners, tutorial
Published: 2019-07-21 13:08:42

Welcome to my second tutorial series called **Webdevelopment for Beginners**. This series will be written for beginners trying to get into Webdevelopment but don't know where to start. I'll try to keep everything as simple as possible and link resources to learn more.

In the span of this tutorial you will read about the following topics:

- The tools used for webdevelopment
- Awesome learning resources and links
- What is HTML and how to write it
- What is CSS and how to write it
- The box layout and how layouting in browsers work
- How to combine HTML and CSS to create simple page layouts
- How to host a website
- What is JavaScript and how to write it

# Lets get started: What tools do you need to start developing websites?

Luckily you really don't need any tools to begin with webdevelopment. You could fire up your notepad or any other text editor and start writing code which is okay but for beginners I suggest using tools that can help you memorizing code without looking up a tutorial or documentation every 5 seconds.

For that, I'd suggest [Visual Studio Code](https://code.visualstudio.com/) developed by Microsoft. It supports autocompletion for code and helps you with suggestions for code you write.

I'd advise against any tool that supports WYSIWYG (What you see is what you get). Visual editors are bad for you and won't help you with your future development because it generates really bad code 90% of the time and won't help you actually learning the code.

*But if I can use a visual editor, why should I learn to code?*

As I said visual editors generate code **really bad**. That could change in a few years with AI and Machine Learning but even then editors never really work well with logic implementations.

Also it's way more fun writing code and seeing the output working fine. :)

# Any other tools needed?

You actually just need a browser. I'd suggest using Chrome or Firefox. Chrome has superior development tools when it comes to editing styles, responsive development, debugging JavaScript or analyzing your page but will watch you (since it's Google).

If you are a privacy advocate I'd suggest using Firefox. It also has good styling devtools, a really good layouting helper and other nice tools. Just the debugger and analyzing tools are behind Google Chrome.

After having your preferred tools setup and running, you're ready to write your first small website.

Read about it in my next post in this series!
markpedia
Tags: github, markdown, wikipedia, pandoc
Published: 2019-07-21 12:27:48

Wikipedia in Markdown format:

1. clone the project [github.com/rognoni/markpedia](https://github.com/rognoni/markpedia)
2. create a new MediaWiki markup file, for example [wiki/Anti-pattern.wiki](https://en.wikipedia.org/w/index.php?title=Anti-pattern&action=edit)
3. execute the command `pandoc -s Anti-pattern.wiki -o Anti-pattern.md`
4. edit style and content, for example add `.md` extension to the wiki-links
5. push and browse [https://raw.githubusercontent.com/rognoni/markpedia/master/wiki/Anti-pattern.md](https://monastic.netlify.com/#/url/https://raw.githubusercontent.com/rognoni/markpedia/master/wiki/Anti-pattern.md)
6. make a pull request
What is software to you? Day job, passion, hobby, career, something else?
Tags: discuss, career
Published: 2019-07-21 11:45:29

*Cover photo by Dylan Gillis on Unsplash*

We all came to software from different places, and we're all going somewhere different, so I figure we all *see* it differently as well. 

Tell me about how you relate to the field in general, if you would?
Using Array prototypes in strange ways #1
Tags: javascript, programming
Published: 2019-07-21 11:06:57

---
title: Using Array prototypes in strange ways #1
published: true
description: How to sort an array using .reduce()
tags: javascript, programming
---

Greg Bulmash wrote a posting recently entitled [JavaScript Bubble Sort in the fewest lines](https://dev.to/yiddishninja/javascript-bubble-sort-in-the-fewest-lines-5e5n). This got me thinking about ways to get around `.forEach()`'s insistence on iterating over every item. I still haven't found a solution, but I did discover an interesting way to sort an array using `.reduce()`!

The code here is V8 JavaScript but with some infrastructure provided by C# using my [Lychen](https://github.com/axtens/Lychen) project. 

First step is to pull from the command-line the length of the test array, defaulting to 10.
```
const aLen = CSSettings.ContainsKey("/LENGTH") ? parseInt(CSSettings("/LENGTH"), 10) : 10;
```
We then initialise the array: allocate space, fill with zero, then map some random numbers in.
```
const array = Array(aLen).fill(0).map(function (item, index) {
  return Math.floor(Math.random() * (index * aLen))
});
```
Next, the main block of code:

First of all check the accumulator (`acc`) to see how many items it has. If zero, then push the current value (`cur`) in. 

If one, then compare the value in acc with cur and if cur is less that or equal to, unshift it into acc. Otherwise push it.

if acc is longer than one, check to see if cur is less than or equal to the first item in acc, in which case unshift into acc, or if greater than the last item in acc, push it into acc. 

If the value is neither pushed nor unshifted, then iterate backwards through acc until cur is greater than the acc value. Add one to the offset and splice cur into acc at that point.
```
const sorted = array.reduce(function (acc, cur, idx, src) {
    if (acc.length === 0) {
      acc.push(cur);
    } else {
      if (acc.length === 1) {
        if (cur <= acc[0]) {
          acc.unshift(cur)
        } else {
          acc.push(cur);
        }
      } else {
        if (cur <= acc[0]) {
          acc.unshift(cur);
        } else {
          if (cur > acc[acc.length - 1]) {
            acc.push(cur);
          } else {
            for (let i = acc.length - 2; i >= 0; i--) {
              if (cur > acc[i]) {
                acc.splice(i + 1, 0, cur);
                break;
              }
            }
          }
        }
      }
    }
    return acc;
  },
    []);
```
Finally, display the results. 
```
CS.System.Console.WriteLine(JSON.stringify(array));
CS.System.Console.WriteLine(JSON.stringify(sorted));
```
This is not a replacement for `.sort()`. I haven't done any timings but I'm not expecting it to win any prizes for speed. It's just ... well ... interesting.
Fast Ordered Model in Phoenix with ecto_list
Tags: elixir, phoenix, ecto
Published: 2019-07-21 09:59:39



![](https://thepracticaldev.s3.amazonaws.com/i/bzuet43fkt64iwibkfb7.gif)

## Why?

I was coding a paid video service with a system of Serie/Video. A serie has several videos ordered according to a defined order. 
I was surprised by how longer it took me to build this feature and by the lack of solution provided by the community. As I realized that I may encounter this problem again, say, if I build a Trello clone, I thought I have to do something. 

Here comes ecto_list ! 

## What?

Ecto_list is both a library and a tutorial with a set of snippets that helps you build ordered model with Ecto rapidly. No LiveView involved ! 

## How does it work?

There is 2 ways to save the order of items: 
- in the items themselves (like `act_as_list` Ruby gem) : i.e. the Videos
- in the model they belong to: i.e. the Serie.

Ecto_list takes the latter option. Why ? Because we want to avoid making several SQL query to update all ordering for one item only and, also, **we assume we preload all the items anyway**. That’s why it makes sense to save the order in the model that has many items.

This library is super easy to understand. There is one function at the moment that does the magic of ordering the items according to a defined order: `EctoList.ordered_items_list/2` . The rest is adding the right snippets at the right parts of the source code. 

## Conclusion

This is my first library ever ( _yeaah!_ 🎉). There is still room for improvements so if you think we can add some interesting features, feel free to contribute. 

### Links:
- ecto_list: https://github.com/popo63301/ecto_list/
- ecto_list_demo: https://github.com/popo63301/ecto_list_demo
9 Tools You May Want to Use with React
Tags: react, productivity
Published: 2019-07-20 22:37:28

## create-react-app
Sometimes we don't need to use this, but generally, this is a very good tool to create a reactjs project.  
https://facebook.github.io/create-react-app/docs/getting-started

And easy to add typescript which is great!!!
https://facebook.github.io/create-react-app/docs/adding-typescript


## React Developer Tools
In terms of this Chrome extension, not `may want to use` but `really need to use` lol.
 
https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en

## Redux Devtools
This is also must-use when using redux. 

https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd?hl=en
 
## React Studio
This looks like Bootstrap studio for Reactjs to me.
React Studio lets you create components either visually or in code, then use them interchangeably in your designs.

https://reactstudio.com/


## Storybook
Storybook is an open source tool for developing UI components in isolation for React, Vue, and Angular. It makes building stunning UIs organized and efficient.
https://storybook.js.org/

Probably most people use this. Storybook can speed up our development.

## Bit
Bit helps your team share components and collaborate to build faster together. Give it a try.
https://bit.dev/

I haven't used this yet but looks really great and useful. Will try this soon.


## react-cosmos
Cosmos scans your project for components and enables you to:

1. Render components under any combination of props, context and state
2. Mock every external dependency (eg. API responses, localStorage, etc)
3. See app state evolve in real-time while interacting with running instances

https://github.com/react-cosmos/react-cosmos

Sounds incredible.

## REACTIDE
Reactide is the first dedicated IDE for React web application development.

http://reactide.io/


## SideView
SideView is a desktop app that enables you to run your components in isolation

https://sideview.app/

Got a message from creator, Hampus Ahlgren. Haven't tried it yet(so sorry).
Microservices using Azure Functions and Event Grid 👍❤️
Tags: microservices, azure, functions, eventgrid
Published: 2019-07-21 07:18:28

# [Page 1] (https://thepracticaldev.s3.amazonaws.com/i/zzuemdqyz2q32zdvqgtd.jpeg) 

![Page 1](https://thepracticaldev.s3.amazonaws.com/i/zzuemdqyz2q32zdvqgtd.jpeg)


# [Page 2] (https://thepracticaldev.s3.amazonaws.com/i/bp5hbdfov5fmrma8m5jo.jpeg)


![Page 2](https://thepracticaldev.s3.amazonaws.com/i/bp5hbdfov5fmrma8m5jo.jpeg)

# Page 3 - to be continued
Naming Library Release
Tags: learningjavascriptwebdev
Published: 2019-07-21 06:29:56

I choose *Indian River* names for naming my library releases. The latest one is **Yamuna(v2.0.0)**. How do you name your library releases?

Check my release naming at - https://github.com/udayvunnam/xng-breadcrumb/releases

Library [xng-breadcrumbs](https://www.npmjs.com/package/xng-breadcrumb)
What degree will be the most useful for Frontend developer who goes to college?
Tags: discuss, education, frontend, career
Published: 2019-07-21 06:02:03

---
title: What degree will be the most useful for Frontend developer who goes to college?
published: true
description: 
tags: #discuss #education #frontend #career
---

First of all, I want to say that I'm a freelance Frontend developer with an experience of 3 years in my 17th and things went that way that I **have** to go to college in another country (Canada, if it matters). Yes, I **have**.

My problem is that I can't decide which education program I should choose. I haven't found any programs that aim only on Frontend. I checked out some "Web design & development" programs and I can say for sure that I'm not going to learn XML, PHP and MySQL.

I was thinking about Computer Science but I'm a Frontend developer and I want to keep working as a Frontend developer in the future, I want to work with React, not some programming language and I'm afraid of math lessons! But I still have to go to college so I'm trying to find the most useful program that will help me to make some good contacts in this field and upgrade some other skills that will be useful in life in the future.

Any suggestions, thoughts and advice are more than welcome and appreciated, thanks :)
Listing out the history of a particular file in Git
Tags: git
Published: 2019-07-21 05:35:33

There are multiple ways to follow a file's history in
Git. You can use a double-dash and pass file names that you want to list
out the log for. But there's a limitation to what it can do. A better
option would be to use the --follow flag for git log command. I wrote about this in a little more detail here:

https://kgrz.io/use-git-log-follow-for-file-history.html
Adding Front-end framework to existing PHP project 
Tags: vue
Published: 2019-07-21 04:55:04

---
title: Adding Front-end framework to existing PHP project 
published: true
description: Answer to question at https://stackoverflow.com/questions/57129851/how-to-use-js-frameworks-like-react-and-vue-and-es6-with-a-php-project
tags: Vue
---


This was an answer to question at stack overflow that I couldn't post because it was closed before I could post it. https://stackoverflow.com/questions/57129851/how-to-use-js-frameworks-like-react-and-vue-and-es6-with-a-php-project

For a newcomer to front-end frameworks, I'd say probably the easiest way is to make small incremental changes replacing jQuery with Vue. I'd say Vue, and NOT React, because of the learning curve and changes since v. 16 that make it less friendly for un-compiled use. The React team seems to have dropped interest in supporting this kind of progressive approach by deprecating `React.createClass` from the main package. You can still do it, but it's an extra package now. 

You can add incremental chages by adding a new script tag like   
`<script src="https://cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.js"></script>`  
into your PHP template which will load Vue in addition to jQuery until you have removed jQuery completely)

Then find a component you want to convert from jQuery to Vue.

You can now add a Vue template or component into your PHP layout/page and the JS script into the page, a page script file, or a component-specific script file.

Rinse and repeat for other components.

It's important to note though that this is not the best practice. Ideally you'd have a JS pipeline that generates a SPA(Single Page App) and deals with APIs from your PHP app. This is my preferred way of developing apps, but it's not a must. Doing it the way I described will add some pain when it comes to managing the app long-term, but it's likely not as bad as managing jQuery. As long as you organize your files well, using this method is a reasonable way to get started with adding some advanced functionality. If you know you're going to support modern browsers only, you can start defining templates in the script using template literals, which will help with code management, since you can keep your vue layouts in js files instead of in php templates. Later on, as you get more comfortable, you can start consolidating the project into a unified SPA that gets all the benefits of a compiled project.
What would your dream tech conference look like?
Tags: meta, community, tech
Published: 2019-07-21 03:46:16

---
title: What would your dream tech conference look like?
published: true
description: 
tags: meta, community, tech
cover_image: https://thepracticaldev.s3.amazonaws.com/i/e1rhv4buhbcdjz9tfcn5.jpg
---

With [Codeland](http://codelandconf.com) just around the corner, it got me thinking. 

If resources, time, etc were not an issue, what would your dream tech conference look like?

Think about the topic(s), location, content, format, swag, etc.

The sky is the limit!

*[Photo by Andrei Stratu on Unsplash](https://unsplash.com/photos/kcJsQ3PJrYU)*
Hiring and interviewing developers
Published: 2019-07-21 03:36:40

I wrote this as a series of tweets, but perhaps here's a better place to capture it for the long term.

I've been researching and experimenting with hiring+interviewing techniques. Might as well jump on this current “10X” bandwagon, eh? Here is some of what I’ve learned. (Context: I mostly hire software developers, but also other roles.)

No matter what words are or are not in a job posting, a large number of people who plainly do not match the job at all will apply.
~Every company hires only the best people. Mysteriously, the economy is nonetheless at only a few percent unemployment.

Many experts advocate spending hours digging into inappropriately internal details of past employers. Mysteriously, all then expect the new hire to keep their confidences.

Many experts advocate their particular style of interview as the obvious best. But anyone can go on YouTube and learn how to game any popular interview style.

Many experts’ basic idea is “past performance equals future results”. You can pay a lot of money for that advice. About a hypothetical world in which people do not grow or change.

Many companies interview software developers with doofus second-year-CS questions. Apparently they do this out of habit, because it seems to reveal little about job performance.

Time is precious. Have a time budget, and stick to it ruthlessly. Interruption may be necessary.

For technical work, do you want to hire people good at talking about X or doing X? If the latter, find a way to "audition".

Lots of applicants want to "hop on a call". Time is precious. Exchange some info first, use that to decide whether to interview. Then meet with an agenda, via a video chat for more complete communication.

Questions with one right answer aren't that useful. Questions that reveal skill and experience levels are very useful.

That's it for now. If you liked that and are a software developer with deep Angular or other web platform skills, keep an eye on our careers page. oasisdigital.com/careers