teleren/devto huggingface dataset:
Live-reloading of Python Modules in the Python REPL / IPython / Jupyter Console
Tags: python, jupyter, tip
Published: 2018-05-23 16:04:54

---
title: Live-reloading of Python Modules in the Python REPL / IPython / Jupyter Console
published: true
description: 
tags: python, jupyter, tip
---

Often, I would work on a Python module and add changes to it live, which I would then want to test immediately. Piece of cake! Add the changes and execute the script again. Well, that’s certainly a way, but as modules get bigger, they tend to import other modules, or do some preliminary setup work. 

With time, I have developed this practice of opening up a Python REPL (though I recommend IPython or the Jupyter Console for that), importing my in-progress module and singling out separate functions I would like to test. The problem is, when I do changes to the Python code (like, add a new function), they are not immediately usable, because neither the Python REPL, nor IPython / Jupyter would auto-reload them. 

## Give me the code
Yes, we are coming to that
### General Way

Python 3 supports inline reloading of modules using a function called, well clever enough, `reload`. It used to be a built-in function in Python 2, but this is no longer the case. If you are using Python 3.2+, you should import it extra:

For Python 3.2 and 3.3:

```python
import importlib
importlib.reload(some_module)
```

For Python 3.4+:

```python
import imp
imp.reload(some_module)
```

### IPython/Jupyter Magic
Jupyter comes with a set of extensions only applicable to the Jupyter/iPython sessions, called [magics](https://ipython.org/ipython-doc/3/interactive/magics.html). One of these “magics” is the ability to load custom extensions, [one of which](http://ipython.readthedocs.io/en/stable/config/extensions/index.html) allows auto-reloading of modules. To enable this, you should add the following two commands, before any imports:

```python
%load_ext autoreload
%autoreload 2
# you can check out the the documentation for the rest of the autoreaload modes
# by apending a question mark to %autoreload, like this:
# %autoreload?
```

This way, as soon as you hit `Save` in your code editor, you should be able to re-run a Jupyter cell or an iPython line again, and if it is calling your  module, it should automatically call the latest version.

## Links
[Jupyter / IPython: After editing a module, changes are not effective without kernel restart – Enthought Knowledge Base](https://support.enthought.com/hc/en-us/articles/204469240-Jupyter-IPython-After-editing-a-module-changes-are-not-effective-without-kernel-restart)
[python - Reloading submodules in IPython - Stack Overflow](https://stackoverflow.com/questions/5364050/reloading-submodules-in-ipython#5399339)

---

NOTE: This post first appeared on [my blog](https://preslav.me/2018/04/22/live-reloading-of-python-modules/)
Is bubbling scroll events terrible?
Tags: discuss, webdev
Published: 2018-05-23 15:10:19

---
title: Is bubbling scroll events terrible?
published: true
description: Am I doing this right?
tags: discuss,webdev
---

First, as a user, when on a web page that scrolls and contains elements which scroll, I find it terrible behavior to scroll the parent of an element when it has reached it's end. To be clear: a page that is 1000px high with a window that is 700px high will scroll. This page then has an element that is sized to 200px high with 400px of content scrolling inside it. When you place your mouse cursor over the 200px element and scroll, the content in that element will scroll. When you reach the end of that content, and the mouse cursor is still hovering that same element, the page will then begin to scroll.

I find this behavior insane and terrible, am I the odd-ball or outlier on this? Or do others also find this at least irritating or problematic?

Related but not addressed here is the issue of scrolling down a long page and a scrollable element becoming focused by moving under the stationary cursor and then acting on the scrolling event?

Is there just a bigger problem of bad user experience from nested scrolling?

Second; is there a way, maybe with injected javascript from a browser plugin, to change this behavior? Is it possible to find all scrolling elements and prevent them from bubbling the scroll event? (I'm ok with JS, but I'm years out of practice with DOM)
Tech in Pop Culture - Accurate or Hilarious? 
Tags: culture, industry, entertainment, humor
Published: 2018-05-23 14:36:30

---
title: Tech in Pop Culture - Accurate or Hilarious? 
published: true
description: Tech depictions in the entertainment industry have come a long way.
tags: culture, industry, entertainment, humor
---

It's pretty amazing to see how much technology is appearing as a star of the show rather than an extra in the entertainment world. 

While watching 'Mr. Robot' I almost fell over backwards when I saw Elliot was using BitchX - an IRC shell client. Kali Linux, terminal programs, and various toolkits are realistic depictions of the things a hacker would use to attack their victim. 

![Rami Malek as Elliot in Mr. Robot. Photo: Virginia Sherwood/USA Network](https://thepracticaldev.s3.amazonaws.com/i/o1rvpmrzhmdy74memtvf.jpg)
<figcaption>Rami Malek as Elliot in Mr. Robot. Photo: Virginia Sherwood/USA Network</figcaption>

Here is a funny discussion on a subreddit about whether the hosts are actually using [React or Swift:](https://www.reddit.com/r/ProgrammerHumor/comments/5go6p2/the_code_of_westworlds_hosts_is_using_react) from the HBO series 'West World'.

Another HBO series, 'Silicon Valley' has its finger on the pulse of the tech industry and culture that has permeated out from the west coast. It's a fabulous depiction of the start-up entrepreneurial mentality of many tech companies, and the expedition to create the latest and greatest thing.  Also, 
[who doesn't love Gilfoyle?](https://www.theverge.com/2018/4/29/17286148/silicon-valley-gilfoyle-napalm-death-bitcoin-price) 

Trust me, they didn't always get it quite right. Let's look at some hilarious examples of when they didn't. Shall we?

From the show 'CSI': 
{% youtube hkDD03yeLnU %}

Hold up, rewind the tape, what was that? 

"I'll create a GUI interface using visual basic. See if I can track an IP address." 
Wow, tracking the killer wasn't a pressing situation I guess. 

Here's another one from the movie 'Jurassic Park':
{% youtube URVS4H7vrdU %} 
I guess that Dennis fellow really liked the idea of organizing files in some sort of 3-D UI system. Very high tech!

From "Castle" Season 8 Episode 8:
{% youtube K7Hn1rPQouU %}

Remember kids if you want to get root privileges on a server, all you have to do is crack the outer layer of the system, but beware of the intrusion inspection or else they'll be able to track your IP address!
 
As you can see the entertainment industry is now realizing they have to shell out a few extra dollars to create more realistic depictions of the tech industry if they want to avoid so many facepalms. Even in some cases tech is completely forefront, and it's nice to finally get an appreciative nod to us techies from them crazy Hollywood folks.
RESTful and Summary Resource Paths
Tags: rfc, rest, restful, discuss
Published: 2018-05-23 11:59:51

---
title: RESTful and Summary Resource Paths
published: true
description: Comment with your favorite strategy for naming summary resources and their paths.
tags: RFC, REST, RESTful, discuss
---

I'm a big fan of RESTful approach to defining paths and accessing resources. The struggle today is how to approach what I refer to as "summary" resources. 

For example, if the desire were to provide the current standings for a sports league - teams, wins, losses, games-behind, winning-percentage - how would that path be defined ?

+ /sportsleague/standings ?
+ /sportsleague/standing ?

What if there are multiple "formats" of similar information ? 

What if the first were standings within a conference, but the second format were playoff standings (see USA's National Basketball Association) that completely ignore individual conferences (subsets).

+ /sportsleague/standing(s?) and /sportsleague/playoffstanding(s?) ?
+ /sportsleague/standing/conference and /sportsleague/standing/playoff

For added complexity, consider a third report that considers additional at-large playoff spots (see USA's Major League Baseball or National Football League's "wildcard" standings concept)? The games behind metric still means the same thing, but its been adjusted to consider who "leads" the wild card chase. Rather than meaning "games out of first place," it comes to mean "games out of the playoffs" and is therefore based on the "last wildcard team" not the "first wildcard team." That's all a long way of saying the calculation is different, but the presentation structure is the same.

+ (from above) ... and /sportsleague/playoffstandingwildcard(s?) ?
+ (from above) ... and /sportsleague/standing/wildcard ?

More generally, if this is just one of a number of summary reports, would we toss all reports into a category and nest specifics within the reports category ?

+ /sportsleague/report/standing/conference
+ /sportsleague/report/standing/playoff
+ /sportsleague/report/player/17/career

But in this case, the application of a "report resource" would seem to be non-beneficial. 

+ /sportsleague/standing/conference
+ /sportsleague/standing/playoff
+ /sportsleague/player/17/career


The real context for my question revolves around attempting to define RESTful paths to many different statistical reports which all use the same core data, but perform subtly different analysis for consumption by the user.

For example, we have (at least) three different reports which compose a list of people and their top five talents into a matrix sorted by various (non-trivial)  criteria - the different criteria are the source of the different reports. I'm having difficulty defining the paths to access the data.

Looking forward to reading your suggestions and answering any clarifying questions. And if I've started off on the wrong foot conceptually (it happens), please point me off in another direction that has something better to offer.


Thanks,
Cary
Spot A Fake Agile Team In Under 7 Minutes!
Tags: agile, culture, career, productivity
Published: 2018-05-23 11:39:23

---
title: Spot A Fake Agile Team In Under 7 Minutes!
published: true
description: There's an industry of speakers, authors, and consultants that want you to think there's "one true way" to be agile.
tags: #agile #culture #career #productivity
---

Some people just love telling others "you're doing it wrong!", and agile development is a popular target.

And if you ask many developers privately, they'll tell you they actually hate how agile methods like scrum and kanban have been setup at their company.

There are many articles online claiming to help people identify "fake agile"... 

But these articles are just talking about agile processes like scrum and kanban.

**An agile team can actually use any software development process they want!**

If this sounds new to you -

It's because the industry is making agile development into a cash cow for authors, trainers, and consultants that want you to think it's complicated.

But the real reason why we do agile development is actually really simple.

So I made this short video to help you spot fake agile teams in under 7 minutes.

With this information, you'll know the truth, **but may be disappointed to find that your project isn't even remotely agile**. 

There are really only two questions you need to ask!

By the end of this video, you'll be able to know in an interview whether the team you're joining is agile, call B.S. on an agile coach who misses the point, and help the people on your team work together better.

# [📺 Watch this video on YouTube](https://www.youtube.com/watch?v=H6GdK-dChtY&index=2&t=0s&list=PL32pD389V8xuu5-ApC8RpSZXDmte6DwvY)

Or listen as a podcast:
[🎧 Soundcloud](https://soundcloud.com/jayme-edwards-media/spot-a-fake-agile-team-in-under-7-minutes)

Related videos:
* [📺 An Agile Budget Keeps You From Being A Code Monkey](https://www.youtube.com/watch?v=pG4wNLopMZA&t=0s&index=6&list=PL32pD389V8xt_znF-pvOl7OP_xNfnkGgq)<hr />
[🔔 Subscribe for 90+ videos on healthy software development](https://YouTube.com/c/JaymeEdwardsmedia?sub_confirmation=1)
Dapps tutorials 
Tags: blockchain, tutorials, dapps, smartcontract
Published: 2018-05-23 10:44:37

---
title: Dapps tutorials 
published: true
description: Guy's we run a blockchain focused blog Coinmonks to help developers to learn about blockchain tech and build things. I am sure you all will love it, feedbacks are welcome.
tags: blockchain, tutorials, dapps , smart contract
---
[Dapps tutorials and guides](https://medium.com/coinmonks/dapps/home)
Do we really need to interview about data structure and algorithms traditionally?
Tags: datastructure, algorithms, c, interview
Published: 2018-05-23 10:41:24

---
title: Do we really need to interview about data structure and algorithms traditionally?
published: true
description: Is it rightly to ask candidate to implement data structures while we have rich framework libraries? 
tags: data_structure, algorithms, c#, interview
---
As long as you grow up in your career, you move on top of the level that you asked to implement common data structures such as linked list, stack and queue. I have graduated in 2001 where the most common libraries were C++ STL and VC++ MFC. Lots of time I have been interviewed and asked to design and implement queue, stack and list containers.

In 2002, I started to use .NET framework version 1.0 where such data structures were part of the class libraries.

Now after 15 years, I still find people ask the same questions of implementing data structures while the type of development inside the company does not require this. I prefer to ask questions that appropriate to the nature of work. I take another approach when I interview candidate. I ask him about utilizing the built-in containers such as List, Queue and HashTable. For example, I give him the below code:

        var hashTble = new HashTable();
        var diction = new Dictionary<int, string>();

Both are data containers. My questions to the candidate would be:

1- The main difference in terms of internal implementation.
2- The best scenario for each one.
3- Performance in terms of time and space.
4- If I would like to override each one Add method, what I need to do (code).
5- Iterations over each one elements.

In my opinion, through this way I can figure out If the candidate understands such fundamentals very well or not. I always believe that we have to consider the work requirements when we perform interviews. I met lots of interviewers ask complicated questions only to make shows while questions are not related to work nature at all.
What image-hosting sites do you use?
Tags: discuss, webdev, imagehosting
Published: 2018-05-23 10:16:43

---
title: What image-hosting sites do you use?
published: true
description: 
tags: discuss, webdev, image-hosting
---

Hi everyone 🙂! I'm curious to know what image hosting sites you use and if you have any recommendations. 

I'm an avid user of Cloudinary but there's quite a gap between the free plan and the paid plan ($99/month). Are there any inexpensive (or free) image-hosting sites that offer a moderate amount of storage and bandwidth?
Magento 2 FAQ Extension
Tags: magento2faqextension, magento2faqmodule, faqextensionmagento2
Published: 2018-05-23 07:07:55

---
title: Magento 2 FAQ Extension
published: true
description: 
tags: Magento 2 FAQ extension, Magento 2 FAQ module, FAQ extension Magento 2
---

Providing real time customer service is essential for any online store. You need to clear any ambiguity a customer might have before they leave your store. A good way to do so is to list all possible questions that can come to customer's mind and provide their answers. Customers can refer to this FAQ section when encountered with a query. 

[Magento 2 FAQ extension] (https://marketplace.magento.com/fme-faqs.html) by FME makes this easy. It allows you to create a dedicated FAQs page and display all commonly asked questions with their answers. The separate FAQs page lets you post all your entries on one page with a custom title. The questions can be related to your store, products, services, policies etc. The search feature makes it easy for customers to look for their specific FAQ. 

To better organize your FAQs, Magento 2 FAQ module allows you to create topics and put relevant questions under each topic. For example, FAQs related to policies should go under 'store policies' topic. You can sort questions according to your preferences. Add a 'Read More' link for longer answers. 

### Features of Magento 2 FAQs Extension

This extension offers the following exciting features.

- Separate FAQ page
- FAQs block to show featured FAQs
- Create FAQs topic for easy navigation
- FAQs rating & SEO features
- Accordion style
(idea) Link dev.to to twitter, answer a twitter post and it comment on dev.to
Tags: discuss
Published: 2018-05-23 06:57:50

---
title: (idea) Link dev.to to twitter, answer a twitter post and it comment on dev.to
published: true
tags: discuss
---

Hey guys,

What do you think about it ?
Just an idea I had when I saw the post from @ben got so many responses on twitter ( at least, more than dev.to post)

Example :
Dev.to twitter post "What is your routine for staying fit and healthy?" on twitter, people answer the post and the response is written on dev.to comment

Thanks :)
The only one way to educate efficiently
Tags: philosophy, stoicdeveloper
Published: 2018-05-23 06:51:07

---
title: "The only one way to educate efficiently"
published: true
description: "There is only one way to spread any philosophy, methodology, best practices and that's showing good example."
canonical_url: "https://www.sandordargo.com/blog/2018/05/15/the-only-true-way-educate" 
tags: philosophy, stoicdeveloper
---
The best way to spread any philosophy, methodology, best practices is perfectly captured in Steven Pressfield's marvellous novel, [The Tides of War](https://amzn.to/2qIlTHB)

> _"How does one lead free men?_
> _By being better than they... By being better and thus commanding their emulation."_

This is also true for clean coding. The best form of evangelism is always behaviour. 

Let's say you are assigned to a project where the moral is below the line, where people are not willing to help each other and where the code base is just a freakin' mess. 

What are you going to do?

Will you start preaching about the usefulness of [SOLID principles](https://en.wikipedia.org/wiki/SOLID_(object-oriented_design))? Will you present endless talks at team meetings about the importance of helping each other while you keep your eyes down if someone asks for help? Will you build an ivory tower around yourself and will you practice your orating skills from there?

That's one way to do it and some parts of it might be necessary. But most probably the effects will be suboptimal, to say the least. Instead, I'd advise you a little less conversation and a little more action. Action on your side. Be humble, sit down and continue working. That's the best you can do. First, do yourself what you want the others to do.

If you practice clean coding and you improve the repository's shape, soon the others will follow you. If they don't know how to follow you, someone will show up at your desk, asking for help. And there you go! At that point, you might start directly educating your colleagues. But you shouldn't forget even then to be humble.

A real leader will influence by example and that's why you should aim for too. Lead by example, if you really want to change your environment and not just to pose as a wiseguy.

_This article has been originally published on [my blog](http://sandordargo.com/blog/2018/05/15/the-only-true-way-educate)._
Gemba Walks
Tags: discuss, leadership
Published: 2018-05-23 04:24:00

---
title: Gemba Walks
published: true
description: How can Gemba Walks be applied to software engineering?
tags: discuss, leadership
---

In lean manufacturing, there's a concept referred to as [Gemba Walks](https://en.m.wikipedia.org/wiki/Gemba#Gemba_walk). This is essentially where someone who's not directly involved in the day-to-day labor on the manufacturing lines walks the floor to identify waste, observe how the work is actually being performed, build relationships, observe working conditions, and many other things. In manufacturing, it has quite a few benefits and companies that practice it often speak highly of the value it brings.

As it relates to software engineering, **what would you consider to be a Gemba Walk?** How have you seen others or how do you effectively observe working conditions and gained the other benefits that Gemba Walks can bring? If you're not sure you've seen it done, how would you apply Gemba Walks to software engineering? Maybe you are in the "front lines," so to speak, but this could also be applied to staying in-sync with other engineers or other parts of the system. How do you accomplish that?

_(This isn't to say I don't have ideas on this, but I really want to hear **your** ideas on it.)_
Good Chat / Online channels for developers
Tags: discuss, programming
Published: 2018-05-23 03:55:47

---
title: Good Chat / Online channels for developers
published: true
tags: discuss,programming
---

Hello everyone,

There are so many messaging platforms now like [Slack](https://slack.com/), [Gitter](https://gitter.im/), [Discord](https://discordapp.com/), [Stackoverflow chat](https://chat.stackoverflow.com/) and the good old IRC. What are some of the channels which are good for developers? They can either be general or specific to some programming language or framework e.g nodejs or android.
How do you come up with your online biographies?
Tags: discuss, career, branding
Published: 2018-05-23 01:08:46

---
title: How do you come up with your online biographies?
published: true
description: Referring to it as a bio looked too much like BIOS
tags: discuss, career, branding
---

With pretty much every social site letting you write about yourself, how do you approach developing your "About Me"?

I can think of a few sites where this applies:
* [dev.to](https://dev.to/settings) and other blog-ish platforms
* [GitHub](https://github.com/settings/profile) and other code platforms
* LinkedIn summaries and headlines
* Facebook public profiles
* Each StackExchange site
* Personal websites / portfolios
* Pluralsight and other learning platforms
* The new reddit userpages
* Anything with a concept of a profile, really.

Do you go fun and quirky or professional and informational? Do you write about what you do, what you've done, or what you want to get into? How does your "personal branding" change across each site?