teleren/devto huggingface dataset:
Curriculum.co.ke ~ From KnockoutJS to VueJS
Tags: curriculumcoke, vue, knockoutjs, javascript
Published: 2018-06-15 21:21:03

---
title: "Curriculum.co.ke ~ From KnockoutJS to VueJS"
published: true
description: 
tags: curriculum.co.ke, vuejs, KnockoutJS, javascript
---
![Curriculum.co.ke](https://i.imgur.com/kECJIHN.png "v2.curriculum.co.ke")

I started a personal project and named it [Curriculum.co.ke ~ https://curriculum.co.ke/](https://curriculum.co.ke/), because it's #Kenyan. After chasing some customers, they told me to go back and solve some usability problems, like adding a home page. 
So far am redesigning the **user interface** and the **user experience** as well as adding new features. Am also recreating the app with VueJS from KnockoutJS

What do you thing my [new interface ~ http://v2.curriculum.co.ke/](http://v2.curriculum.co.ke/) looks? is the app comprehensible?
Kotlin - Is it time to switch from Java?
Tags: discuss, kotlin, android, java
Published: 2018-06-15 19:56:52

---
title: Kotlin - Is it time to switch from Java?
published: true
description: Should new Android developers switch to Kotlin. 
tags: #discuss #kotlin #android #java
---

Kotlin is now official part of the Android development. But I am trying to find out if existing Android app should move to kotlin now.

I am skeptical about kotlin because community tutorials and articles or even youtube videos are limited in numbers when it comes to Kotlin and Android.  

What are some of the features and performance benefits you get from switching to kotlin code?
Installing pgAdmin Only after installing PostgreSQL with Homebrew
Tags: postgres, hombrew, pgadmin
Published: 2018-06-15 19:13:43

---
title: Installing pgAdmin Only after installing PostgreSQL with Homebrew
published: true
description: 
tags: postgresql,hombrew,pgadmin
---

![pgAdmin](https://thepracticaldev.s3.amazonaws.com/i/lr6cl6v735pxx42x6uln.png)

This post was first published on my [developer blog](http://www.mariadcampbell.com/) on ***June 15, 2018***.

**Update June 17, 2018:** I revisited this issue just now and the set up really is easy. I will be writing a post on this and will link it to here. I much prefer using Homebrew, especially for local development, but I also like having the ability to use a GUI. This set set up just makes life so much easier if you want to push your local repo to remotes such as Github! To view my post entitled [Installing pgAdmin Only after installing PostgreSQL with Homebrew Part 2](https://dev.to/letsbsocial1/installing-pgadmin-only-after-installing-postgresql-with-homebrew-part-2-4k44) here, please visit [Installing pgAdmin Only after installing PostgreSQL with Homebrew Part 2](https://dev.to/letsbsocial1/installing-pgadmin-only-after-installing-postgresql-with-homebrew-part-2-4k44).

I recently started to learn **PostgreSQL**, and installed it on my **Mac High Sierra** with **Homebrew**. Today, I decided to delve much deeper into it and found a couple of interesting courses on it on [Udemy](https://www.udemy.com/postgresql-from-zero-to-hero/learn/v4/overview) (my course at **NYCDA** was severely lacking). I hadn’t installed **pgAdmin** with **Homebrew** previously because it is severely outdated, but decided I should give it a try on the **pgAdmin** website. I installed it and tried to log in. I received the message that the **role** `postgres` was ***missing***, and I could not log in. That is because I had chosen to use my **computer shortname** instead. I decided to investigate the matter.

After some searching, I came up with the following from **Stackoverflow**:

[psql: FATAL: role “postgres” does not exist](https://stackoverflow.com/questions/15301826/psql-fatal-role-postgres-does-not-exist)

The part that worked for me, and should for anyone else in a similar situation, is the following in the thread:

```
@RogerLipscombe if you run brew link postgresql after the installation, there's no need to append the whole path to createuser, a simple createuser -s postgres will work great
```
It is a comment there, and it worked like a charm! I went back into **pgAdmin**, the **GUI** recognized my ***new*** **postgres user**, and I was able to log in.

For me, using **Homebrew** to manage my activity in **postgres** was the way to go, but I also wanted to be able to go into the **pgAdmin GUI** and get a comprehensive overview of my database activity.

Hope this helps, and **happy** ***pgAdmining***!


**Related Resources:**
[How to uninstall postgreSQL on OSX and reinstall with Homebrew](http://www.mariadcampbell.com/2018/05/01/how-to-uninstall-postgresql-on-osx-and-reinstall-with-homebrew/)
How do you get a decent estimate on the time it will take to complete a task? 
Tags: discuss, work
Published: 2018-06-15 16:55:02

---
title: How do you get a decent estimate on the time it will take to complete a task? 
published: true
description: 
tags: discuss, work
---

I have had certain situations where I gave how much time I thought it would take, usually fixing a bug or adding a new feature, but it took way longer. Do you have some tips in mind?
Best iOS App Development on Windows Tutorial
Tags: iosappdevelopment, howtodevelopanapp, appdeveloper
Published: 2018-06-15 15:40:06

---
title: Best iOS App Development on Windows Tutorial
published: true
description: So you have a cool idea for an iPhone app? Read the article and learn how to develop app.
tags: ios app development, how to develop an app, app developer

---


#One When learning iOS development the first question is generally "how much money I will make and how soon will I make it? and  Do I have to have a Mac computer to create a cool iOS app?". 

##Two Without any other given thought people generally dive in unprepared and start developing their iPhone app idea.

![iOS App Development](https://i.imgur.com/NUeKTPA.png)

The sad truth is that even if your finished iPhone app concept passes the rigorous testing by Apple it is all to common to see app fail to make a sale. The next scenario will generally see you as the [app developer](http://offingapp.com/) trying to give your app away. By the time you get to this stage your iPhone App concept has turned into a fruitless venture leaving you frustrated, and out of pocket. 

The iOS App Development Process Within Windows. Phase One Your App Idea

![App Development Process](https://i.imgur.com/hZY316o.png)

So you have a cool idea for an iPhone app. You think it's a winner and you want to start developing that idea and make it a huge popular success. You can't program and you don't own an expensive Mac. You are on a low budget and can't afford the expensive hardware or software. 

But never the less you are determined and you would like to develop your app concept. If that is you then that sounds like you we have something in common. I don't have a Mac and I haven't done any programming in years. But developing your iPhone app isn't all about encoding, frameworks and compiling. The most important fact for iOS Development on Windows is your IDEA.

To start your app development and before you put pen to paper you MUST assess, evaluate and improve on your idea. Not to give to much away but part of The FreeTheApps process teaches you step by step how to check out your competition that is already making a hit to see how your idea can improve on you competitors idea. Thus when it gets into the iPhone app store you have a target audience.

This is all part of the assessment and evaluation of your iPhone application. As an example of an evaluation if a competitors app only reacts to touch commands then build your app to react to voice and touch commands. You see where were going with this. There is allot more involved and you will be shown how best to market your app as it is no longer sufficient just to get your app approved within the iPhone app Store. Once you have completed this phase a couple of times it does become second nature.  

If you expect to achieve a realistic income from making iPhone apps and learn the methods to sustain that income then you should use a training tutorial such as this by Offingapp.
Follow Friday!
Tags: discuss, followfriday
Published: 2018-06-15 15:03:42

---
title: Follow Friday!
published: true
description: Following folks on dev.to has always been key to customizing the kind of content you're more likely to see in your feed and notifications, but now that we have DEV Connect I feel like there is even more we can do by following folks with shared interests and willingness to be helpful.
tags: discuss, followfriday
---

Following folks on [dev.to](https://dev.to/ben/changelog-announcing-dev-connect-beta-1i5f) has always been key to customizing the kind of content you're more likely to see in your feed and notifications, but now that we have [DEV Connect](https://dev.to/ben/changelog-announcing-dev-connect-beta-1i5f) I feel like there is even more we can do by following folks with shared interests and willingness to be helpful.

So I made this thread. Below you can either write about **why someone might want to follow you** or **devs you think others should follow and why**. Feel free to do both.

Everyone is encouraged to follow-back, but obviously not a requirement.

_Edit: I'm not sure why all the follow buttons are pink right now. That's a bug. I'm pretty sure it's because the last one on the screen is currently pink and we've messed up the styling scope on these. Will fix soon. 😄_
Write a script to identify similarity from two string.
Tags: challenge, ruby, python, javascript
Published: 2018-06-15 14:43:59

---
title: Write a script to identify similarity from two string.
published: true
tags: challenge,ruby,python,javascript
---

Implement a similarity method that compares two strings and returns a number representing the percent similarity between the two strings.

The method must be able to calculate the minimum number of operations you must do to change 1 string into another. In other words the the Levenshtein distance is the model.


``` ruby
  def similarity(string1, string2)
    # ...
    return similarity_percentage
  end
```
Check if the chain has the same amount
Tags: challenge, javascript, python, etc
Published: 2018-06-15 14:28:53

---
title: Check if the chain has the same amount
published: true
tags: challenge, javascript, python, etc
---

Check if a string has the same amount of 'x' and 'o'. The method must return a Boolean value and must not be case-sensitive. The string can contain any char.
Umbraco Initial Developer Workshop
Tags: umbraco, basics, workshop
Published: 2018-06-15 13:45:29

---
title: Umbraco Initial Developer Workshop
published: true
description: A great initial guide for understanding the basics of setting up a Umbraco site. This guide will take you from File -> new Project to content render.
tags: Umbraco,Basics,Workshop
---

I recently ran an Umbraco workshop for the company I work at and thought it would be useful to document it. The idea of the workshop is to take you from a File -> new Project to a piece of content being render on the page.

Unfortantly I haven't gotten around to creating a video of the workshop, but all the documentation is up on my Blog for people who would like learn Umbraco.

The post can be found [here](http://www.jordanbradleyward.com/umbraco/umbraco-initial-developer-workshop/)

Happy Coding! :)
EPiServer Custom Dojo Widget
Tags: episerves, dojo, widget
Published: 2018-06-15 13:32:24

---
title: EPiServer Custom Dojo Widget
published: True
description: We will be creating a custom Dojo widget in EPiServer called Adaptive Images that allows an editor to choose multiple images.
tags: EPiServes,Dojo,Widget
canonical_url: http://www.jordanbradleyward.com/episerver/episerver-custom-dojo-widget/
---

My latest blog post goes through how to create a Custom Dojo widget in EPiServer. In it we will be creating a dojo widget called Adaptive Images that allows an editor to choose multiple images.

Read the post [here](http://www.jordanbradleyward.com/episerver/episerver-custom-dojo-widget/)
The Week in Learning for Friday, June 15th, 2018.
Published: 2018-06-15 12:58:24

---
title: The Week in Learning for Friday, June 15th, 2018.
published: true
description: Tell us what you've learned this week!
tags: 
---

As part of a technical screening project I did this week, I had to create a web app that would show 10,000 markers on a Google Map.  Each coordinate had to be randomly generated and fall within a specific range of Latitude and Longitude. Each marker had to have a specific color that was based on another set of ranges. The screen had to display the total number of markers by color. Finally, you needed to be able to turn the markers on and off.  

Then comes the kicker: this has to happen in SalesForce.  

Yes, my friends, I had a crash course in Apex Script and generating web pages using VisualForce. I also had to learn the Google Map API.

I started with what I knew and decided to do the Javascript using JSFiddle and then when I was happy with that, I would move it to SalesForce.

When I began this project, I was wondering about showing 10,000 markers on a map.  I mean what's the point of that? When I was finally able to get it to render, this is what it looked like. I laughed as it all clicked into place.

![Google Map of North America with 10,000 Markers](https://thepracticaldev.s3.amazonaws.com/i/naxwpvlih5gk0v7roj50.PNG)

So I had to create a custom SalesForce object, generate the coordinates in SalesForce using an Apex Script, transfer the Html and Javacript into a VisualForce page and then get the data from the created objects. Remember, I had never used SalesForce at all before starting this project.

I was only marginally successful. The issue is that the RemoteObjects feature of VisualForce can only grab up to 100 records. I couldn't for the life of me figure out how to get all the records by doing multple requests and chunking the data.

So what did I learn?

Sales Force and two of it's related APIs(Apex Script, Visual Force)
The Google Maps API.

What did you learn this week?
MySQL tip of the day: getting rid of the results formatting on the CLI
Tags: mysql
Published: 2020-01-01 08:23:25

---
title: MySQL tip of the day: getting rid of the results formatting on the CLI
published: true
date: 2018-06-15 09:29:55 UTC
tags: ['mysql']
canonical_url: https://blog.riff.org/2018_06_15_mysql_tip_of_the_day_getting_rid_of_the_results_formatting_on_the_cli
---

- More posts on [mysql](https://blog.riff.org/tags/mysql)

### The problem

When using MySQL from the CLI, the `-e` flag comes in handy to execute MySQL commands directly in bash, like `mysql -uroot -p -e "SHOW DATABASES;"`. Which gives nicely formatted output like:
```
+-----------------------+
| Database              |
+-----------------------+
| drop_7                |
| drop_8                |
| pressflow             |
(...snip...)
+-----------------------+
```

The problem is that this table drawing takes up space on screen. Isn't there a way to get rid of it ?

### The solution

The first idea is to check for the MySQL command separators. For example `\G` gives us this:

```
mysql -uroot -p -e "SHOW DATABASES\G"
*************************** 1. row ************************** 
drop_7 
*************************** 2. row ************************** 
drop_8 
*************************** 3. row **************************
pressflow(...snip...)
```

So we got rid of the header, but got row separators instead. Not really a net gain here! Of course we could use a 
```| grep -vF "row **************************"``` but that's not exactly convenient, and might even cause false positives for some queries. Can we do better ?

Turns out we can ; when emitting output, the `mysql` client checks whether the output is a TTY and uses that info to emit the decorative wrapping around results. If the output is _not_ a TTY, it just outputs plain, pipable, results. Which gives us a nice solution, with trusty old `cat(1)`:

```
mysql -uroot -p -e "SHOW DATABASES;" | cat
Database
drop_7
drop_8
pressflow
(...snip...)
```

Now we're getting somewhere: piping the `mysql` stdout to another command makes it no longer be detected as a TTY, so the decoration is no longer used. Of course, we could also just have used the `-s` option to get that format, but the point here was more to take note of TTY vs pipe. In both cases, all that remains is the headers (here "Database"). Easy to remove too.

```
mysql -uroot -p -e "SHOW DATABASES;" | tail +2
drop_7
drop_8
pressflow
(...snip...)
```

That's it. The `+2` option to `tail` makes it start output at line 2, skipping the header. No long command, no false positives.

Closing note: per the [man tail](http://man7.org/linux/man-pages/man1/tail.1.html) reference, the command should actually be `tail -n +2`, but all versions of tail I know do not actually need the `-n` in that case.

<section></section>
Friday Blast #42
Tags: fridayblast, links, post
Published: 2019-01-20 15:25:51

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

[Reducing DRAM footprint with NVM at Facebook (2018)](https://blog.acolyer.org/2018/06/06/reducing-dram-footprint-with-nvm-in-facebook/) - Morning Paper’s review of a new paper by Facebook on their use of NVM for their MySQL databases. Pretty interesting stuff and a cool production use of non-volatile memory.

[Quantum computing for policymakers and philosopher-novelists (2018)](https://www.scottaaronson.com/blog/?p=3848) - good stuff from Scott Aaronson on what quantum computing will mean for _society_. Many folks focus on cryptography, but machine learning and optimization, and simulation of quantum chemestry are even more important.

[ServiceFabric: a distributed platform for building microservices in the cloud (2018)](https://blog.acolyer.org/2018/06/05/servicefabric-a-distributed-platform-for-building-microservices-in-the-cloud/) - another Morning Paper review, this time of a Microsoft system. It’s pretty impressive - sort of Kubernetes on steroids, with a lot of high-availability & routing built in. Still, it’s not a PaaS or anything like that, just a service scheduler.

[Full cycle developers at Netflix - operate what you build (2018)](https://medium.com/netflix-techblog/full-cycle-developers-at-netflix-a08c31f83249) - Netflix aims for their developers to be “full cycle” (I imagine this is an extension of _\_full stack_). This means that they are responsibile for building _and_ running the service. This is pretty common at large Internet companies in fact - Amazon, Google, Facebook etc use it, with SREs doing more infrastructure level work (monitoring a database offered as a service for example). I found the analysis of the pros and cons of this approach interesting as well. Some folks really want to do a certain type of thing, and are going to be frustrated by the full cycle expectation. Though, truth be told, that always comes in the folks who go _deep_. If you’re building compilers at one of these companies, yeah, you’re probably going to be annoyed by an expectation of monitoring a service. But, most probably, you won’t be in that position to boot - you’re building compilers. Other folks do like to see the _whole sausage being made_ (myself included).

[The economics of writing a technical book (2018)](https://medium.com/@rothgar/the-economics-of-writing-a-technical-book-689d0c12fe39) - a really insightful look at what it takes to write a book and what a _typical successful outcome_ is. We’re not talking about massive successes everyone knows about - TAOCP or the like. Just a regular book about current tech, relatively short and with a moderate shelf-life. And it’s not that great. The time committment is huge (year’s worth of side-work), but the payoff is kind of meh. Still, it’s probably a huge ego boost to write a book.
How do you see processes?
Tags: discuss, programming, process, agile
Published: 2018-06-15 06:23:50

---
title: How do you see processes?
published: true
tags: discuss, programming, process, agile
---

I heard an analogy recently from one of my developers that processes are like walls: you want to work on your code, but there is a wall that prevents you; once you remove the wall, you can get to work faster. However, I deeply disagree with this analogy.

As an Agile Coach and Scrum Master, I value People and Interactions over Processes and Tools. However, it is very clear to me that process and tools can aid software development. For example:
 - Scrum (if implemented correctly (and I agree that that's a big 'if')) can increase the speed at which the dev team delivers value to the end user;
 - Pair programming, although it will slow you down a little (very little), it does generate higher quality code, a shared sense of code ownership (increased Bus Factor), and a faster leveling up of devs;
 - [Noisli](noisli.com):  When I'm in deep-work mode, this app gets me in the flow so much faster;
 - Retrospectives - the ultimate tool for a team to solve their own problems, for developers to build their dream work environment!

I could keep going on and on about this.

So what are your opinions on this? Are processes a wall for you? Or are they helpful? Can we bridge the gap between devs that think processes are walls and devs that don't?
Vue.js Slots
Tags: javascript, vue
Published: 2018-06-25 21:06:16

---
title: Vue.js Slots
published: true
tags: javascript, vue
canonical_url: https://flaviocopes.com/vue-slots/
---

> I'm working on a Vue.js course. If you're interested in learning Vue, [get on the list](https://vuecourse.com/) to get a free 120+ pages ebook about the Vue fundamentals tomorrow!

A component can choose to define its content entirely, like in this case:

```
Vue.component('user-name', {
  props: ['name'],
  template: '<p>Hi {{ name }}</p>'
})

```

or it can also let the parent component inject any kind of content into it, by using **slots**.

What’s a slot?

You define it by putting `<slot></slot>` in a component template:

```
Vue.component('user-information', {
  template: '<div class="user-information"><slot></slot></div>'
})

```

When using this component, any content added between the opening and closing tag will be added inside the slot placeholder:

```
<user-information>
  <h2>Hi!</h2>
  <user-name name="Flavio">
</user-information>

```

If you put any content side the `<slot></slot>` tags, that serves as the default content in case nothing is passed in.

A complicated component layout might require a better way to organize content.

Enter **named slots**.

With a named slot you can assign parts of a slot to a specific position in your component template layout, and you use a `slot` attribute to any tag, to assign content to that slot.

Anything outside any template tag is added to the main `slot`.

For convenience I use a `page` single file component in this example:

```
<template>
  <div>
    <main>
      <slot></slot>
    </main>
    <sidebar>
      <slot name="sidebar"></slot>
    </sidebar>
  </div>
</template>


<page>
  <ul slot="sidebar">
    <li>Home</li>
    <li>Contact</li>
  </ul>

  <h2>Page title</h2>
  <p>Page content</p>
</page>

```


> I'm working on a Vue.js course. If you're interested in learning Vue, [get on the list](https://vuecourse.com/) to get a free 120+ pages ebook about the Vue fundamentals tomorrow!