Hubesco's Blog

Inside a software engineer mind

Music on SD Card not showing up (Android)

Rédigé par Pao Aucun commentaire

Until today, I got a problem with my Android device not showing up music when I moved my data on the SD card.

I've tried numerous solutions with all possible combinations and order :

  • Removed all .nomedia files
  • Placed songs in SD card/Music
  • Unmounted / mounted SD card
  • Installed many players
  • Rebooted phone

But none of these worked. Or I was missing something in addition to previous steps.
To fix the issue, music on SD card should be placed in the appropriate folder :

/storage/emulated/0/Android/media (SDCardRootFolder/Android/media)

Now my music is showing up, and thanks to this issue I've found Blackplayer, which is a better player than Google Play Music.

Classé dans : mobile Mots clés : aucun

Workplace headache

Rédigé par Pao 2 commentaires

DISCLAIMER : The following does not happen only in my company. And it's comprehensible stuff. But it gives headache.

------------------

New project, new office, new desk.

Again, I need to set up my tools and my desk to work properly. And again, the same issues remain : slow laptop, network connectivity problems, missing whiteboard, ...

First, the laptop.

It's provided by the company and it's brand new. Windows 7 (getting old but okay), 256 GB SSD, i5 2.40 GHz (2 cores, 4 threads), 8 GB RAM. Good stuff no ? What could be wrong ?

Already 3 blue screen of death (in 2 months), Outlook lagging and sometimes crashing, Software Center not working properly, slow log in...

Why, why, why ? My Windows 10 at home works very well and is very fast ! My only guess is because of custom Windows, modified to comply with corporate's rules and security.

At least, we have admin privileges to install software we need. But, it is monitored and if you install some blacklist software, IT will knock at your door.

Second, the network.

I can understand that, for security reasons, Internet is not wide open. But, as a software engineer working with the Cloud (especially AWS), I expect that I can do everything I want. And of course, port 22 (ssh) is closed. How am I supposed to connect to my EC2 instances ? Or use Ansible (which uses ssh) ?

So now I connect my laptop to a open WiFi. But sometimes, connection drops. Disconnect WiFi and reconnect again. Connection lost. Disconnect, reconnect... When one of my script is frozen, I don't know if because it is processing or because the connection is lost.

Third, desks.

I like open space. Because I like space. And open space let me have a big view of all the floor. It's open and refreshing. But in this open space, there is no personal desk. You need to book it. No personal desk means :

  • every morning, I open my locker, take my laptop, connect to the power, connect the screen, connect the mouse.
  • every evening, I disconnect the cables, pack my laptop and place it in the locker.

Not really efficient. I like open space, but I like also have a personal desk so that I don't move every day.

Four, no whiteboard ?!?

Whiteboard is, in my opinion, a powerful tool to communicate with people. Just pick a pen and draw your idea, while explaining it. Everybody can participate, it's visual, and it's big. Better than writing on a piece of paper.

Finally, processes.

You want to get something ? You want to fix the issues described above ?
Create a ticket on a software and go through the process ! Just wait. Pray that you didn't forget to fill some mandatory field. Pray that the ticket will be accepted. And wait again.

It's not that I don't like processes. I like processes that take the unexpected into account, or enable the new and agility. But I don't like processes that are too standard or too inflexible. It's hard to find a balance between the two, but on a scale from 1 to 10 (standard to anarchy), I would choose 8.

Let me do my job !

Ok, it's not that big issues. I can work. But it's encountering the same issues that's provoking me headaches.
 

My utopian workplace

  • Linux, with at least i5 CPU, 8 GB RAM, SSD 256 GB
  • No restriction on software (even cloud software)
  • 24 inches screen
  • Personal desk
  • Open space
  • 2 whiteboards (at least, or entire walls)
  • Reliable WiFi with no restriction

 

 

 

Classé dans : general Mots clés : aucun

Lesson learned from VPN : hiding is hard

Rédigé par Pao Aucun commentaire

I recently installed a VPN on my private server. I had done this before but I tried to go much deeper by testing my setting. The question was : can I really hide my identity behind this VPN ?

Test 1 : basic test

I am using Yunohost for my private server and Yunohost has an OpenVPN package. So I installed it and then connected to it. It was straightforward.
The first test was pretty basic. I went to https://www.whatismyip.com/ and tried to see if my IP was the server's IP.
And yes it was ! Cool ! Done ? Not at all !

Test 2 : DNS leak

I don't remember where I heard about DNS leak. But that could unveiled your identity and break your anonymity.
First lesson : when you want to be behind a VPN, you have to route ALL traffic through this VPN. Including the DNS requests.

Under certain conditions, even when connected to the anonymity network, the operating system will continue to use its default DNS servers instead of the anonymous DNS servers assigned to your computer by the anonymity network. DNS leaks are a major privacy threat since the anonymity network may be providing a false sense of security while private data is leaking.

dnsleaktest.com

Ok, so let's fix it !
I added some configuration into client ovpn file :

;Ubuntu
up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf

and also in the server ovpn file :

;DNS Leak
push "dhcp-option DNS 208.67.222.222"
push "dhcp-option DNS 208.67.220.220"

For Windows, I followed the steps as per this website.

I went to https://www.dnsleaktest.com/ for the second test.
Hurray ! No more DNS leak !

Test 3 : WebRTC

Another issue I found by browsing the web. WebRTC. Ok what's that ?

WebRTC (Web Real-Time Communication) is a collection of communications protocols and application programming interfaces that enable real-time communication over peer-to-peer connections. This allows web browsers to not only request resources from backend servers, but also real-time information from browsers of other users.

Wikipedia

That's a good feature. But the implementation is crap :

Firefox and Chrome have implemented WebRTC that allow requests to STUN servers be made that will return the local and public IP addresses for the user. These request results are available to javascript, so you can now obtain a users local and public IP addresses in javascript. This demo is an example implementation of that.

Additionally, these STUN requests are made outside of the normal XMLHttpRequest procedure, so they are not visible in the developer console or able to be blocked by plugins such as AdBlockPlus or Ghostery. This makes these types of requests available for online tracking if an advertiser sets up a STUN server with a wildcard domain.

Daniel Roesler

We can prevent this flaw by disabling WebRTC in Firefox :

about:config > media.peerconnection.enabled = false

Again testing, this time I went to https://ipleak.net/. Yeah, it's working.

Test 4 : Geolocation

Uh oh. On the previous website, I saw a new category. Geolocation. And unfortunately, even I was behind my VPN, this map was showing my real location...
Why ? Ok, I found this on Mozilla Firefox website :

If you consent, Firefox gathers information about nearby wireless access points and your computer’s IP address Then Firefox sends this information to the default geolocation service provider, Google Location Services, to get an estimate of your location.

Mozilla Firefox

Firefox tries to tell us that they are not trying to find your location only with your data, but also with nearby wireless access points data. And then it sends everything to Google :facepalm:. Guys, you're killing me.

Fix is pretty simple, just disable geo in Firefox :

about:config > geo.enabled = false.

New test ! Same website as the previous test. And it's working. No more geo.

Test 5 : IPv6

My IPv4 address was showing my server's IP. But my IPv6 address was still mine. So I searched a bit and found some useful information on openvpn.net website.

Starting officially in the 2.3.0 release, OpenVPN supports IPv6 inside the tunnel, and can optionally be configured with IPv6 as a transport protocol for the tunneled data. There were some unofficial developer patches for the 2.2.x series that added partial IPv6 support (Debian in particular chose to integrate these patches into some of their builds.)


After some configuration, I managed to configure IPv6 VPN :

;IPv6
server-ipv6 2001:db8:0:123::/64
push "route-ipv6 2000::/3"

Next test ?

Hiding behind a VPN is hard. I found some issues, but there are certainly plenty of them, waiting to be discovered. Or maybe already discovered and used by some people ?

Classé dans : general Mots clés : aucun

Hi Monzo !

Rédigé par Pao Aucun commentaire

One month ago, I registered to a new bank : Monzo.

It's a completely new bank. A new mobile bank. Yep, no office, just using an Android or iOS app. To quote them :

Finally, a bank as smart as your phone.

Built for your smartphone, this is banking like never before. One that updates your balance instantly, gives intelligent notifications, and is easy to use.

We’re trying to build the best bank on the planet and we want you on board.

Monzo website

Another bank ? But why ?

Monzo is not just a "bank" as we are used to. The company sells services or will sell services (they started not long ago). Bank account is just the foundation. They have quite nice features already implemented or in preparation :

  • Instant notification of your transactions
  • Instant account balance
  • Freeze / unfreeze debit card with one push button
  • Send money to friends
  • Bill splitting
  • Categories
  • Budget planning
  • and much more coming

That's why I liked it as soon as I saw this list : they are trying to make your life easier. Not just selling bank account, savings, insurance, etc. They try to solve the everyday problems.
Their Android app is really fancy, and fast. And they seem to build a really good backend. Technologies I like.

Funny fact : I ordered a debit card, and it's written "Beta" on it. I am not used to have a beta product to pay, but it's working and I look forward seeing more coming from this company !

The Phoenix Project revisited

Rédigé par Pao Aucun commentaire

This blog post is part of the "Revisited" series.

I finished the book The Phoenix Project: A novel about IT, DevOps, and helping your business win, by Gene Kim, Kevin Behr, and George Spafford.

This was really, really interesting. Even though it is a novel (invented story), I could see a lot of real situations. I even laugh at some of them, because I could imagine what will be the following (e.g. They put a software in production even if everything is clunky and not working. Consequence : headline in the newspapers, and a lot of bug fixing).

Below is the plot :

The novel tells the story of Bill, the IT manager at Parts Unlimited. The company’s new IT initiative, code named Phoenix Project, is critical to the future of Parts Unlimited, but the project is massively over budget and very late. The CEO wants Bill to report directly to him and fix the mess in ninety days or else Bill’s entire department will be outsourced. With the help of a prospective board member and his mysterious philosophy of The Three Ways, Bill starts to see that IT work has more in common with manufacturing plant work than he ever imagined. With the clock ticking, Bill must organize work flow, streamline interdepartmental communications, and effectively serve the other business functions at Parts Unlimited.

Wikipedia

I decided to revisit it, putting here some stuff that I found really interesting in the book.

Know what you are committed to (chapter 5)
Bill decides to know what is the Work In Process (WIP) before committing to any new projects. He and his management team establishes a list of every current projects, interviewing everyone working in the department.
This is important to know what is the current state, before talking about the future or any new projects.

If the actual tool doesn't work, change it  (chapter 6)
There is a change management software in place. But nobody is using it, for many reasons.
Bill and his management team uses post it and whiteboard instead of the software. Everyone enjoys the new tool. It is interesting to not hesitate to think completely differently, even discarding actual non working tool for new working tool even it is not software. The right tool for the job. And then, improve constantly.

Have a common vocabulary (chapter 6, chapter 19)
In chapter 6, Operations are trying to find a way to track changes. And someone is asking : what actually is a change ? Then they spend the rest of the meeting to find and agree on a definition of "change" (same in chapter 19, but with the definition of "done").
All projects should have a lexicon, so team members can have a common vocabulary, speaking about the same things. This is quite important, and it is mentioned all throughout the book.

Learn from other industries (chapter 7, chapter 20)

"If you think IT Operations has nothing to learn from Plant Operations, you've wrong. Dead wrong," he says. "Your job as VP of IT Operations is to ensure the fast, predictable, and uninterrupted flow of planned work that delivers value to the business while minimizing the impact and disruption of unplanned work, so you can provide stable, predictable, and secure IT service".

Erik, chapter 7

"Obviously," he continues, "every work center is made up of four things: the machine, the man, the method, and the measures. Suppose for the machine, we select the heat treat oven. The men are the two people required to execute the predefined steps, and we obviously will need measures based on the outcomes of executing the steps in the method."

Erik, chapter 20

Don't be interrupted. Keep focus on your job. Remember the priorities (chapter 10)
In chapter 10, Bill wants to talk with Brent. But before poking him, he just sits and looks how Brent works.
Brent is constantly interrupted by phone call, e-mail, people around, ... and he always works on the last job given to him (later on the book, we find out that Brent is a constraint in the whole delivery process, because so many tasks depend on Brent).
The main point is, don't lose yourself in the continuous flow of work. Always have in mind the priorities and focus on most important tasks, the ones adding the more value. Project manager can shine here, protecting resources and people of interruption, keeping people focused.

Technology is evolving so fast (chapter 14)
Chris, head of Development department, is complaining about the rapid and constant evolution of the technology. However the book have no clear answer on this topic.
What I know, is that yes technology is evolving fast, but value is also about how people work. And what we can do with technology, delivering the maximum value to a client. When we are head of a department, the main objective is to know the features of a particular technology, what it is used for. But the implementation will be done by experts.
I am constantly looking at the news, trying to understand the concepts of new technologies and keeping ready to learn deeper.

Four categories of work : business, internal, changes and unplanned work (chapter 15)
The two first, business and internal, are pretty straightforward. I didn't think about changes as a work, because for me a change is part of a business or internal project. What I understood is that "change" in the book is part of the maintenance and not part of a project.
I already knew about the unplanned work, but the book emphasizes in order to understand deeply the problem with this type of work.

Work for the whole. Not discrete improvement
All over the book, different characters (mostly Erik) say that it is more important to focus on tasks that improve the whole rather than working on discrete improvements. That is the essence of the book and DevOps : drop the boundaries and look at the entire process, from Business, to Development, ending in Operations, and also Security. If you want to improve your organization, you need to improve the global process.

Wait time (chapter 23)
Eriks shows to Bill that most of the time of WIP is spent in queues, waiting to be processed. He draws a graph, showing how long a work can be wait in a queue and how destructive it could be for the delivery and throughput.

The wait time is the ‘percentage of time busy’ divided by the ‘percentage of time idle.’

This blog post is explaining it more in depth.
My conclusion based on what I saw and experimented is people can't be 100% on tasks (especially keep implementing new features). Saving time to improve tools, process, fixing bug can be very productive. Also if people are not 100% used and there is a peak of work in the project, it can be absorbed and processed by the same people.

Talking about private life (chapter 19)
Steve, CEO of Parts Unlimited, tries to build trust inside his management team (first step of the concept The five dysfunctions of a team). One of the exercise is to talk about something in his life, to get vulnerable.
It seems a very interesting exercise, but I don't really like to talk about my private life at work. I prefer to talk about technologies, innovation, how to do things, and trust someone on what he is doing or fixing. One can do anything he wants in his life, as long as he is doing a good job.

Other

"The First Way helps us understand how to create fast flow of work as it moves from Development into IT Operations, because that's what's between the business and the customer. The Second Way shows us how to shorten and amplify feedback loops, so we can fix quality at the source and avoid rework. And the Third Way shows us how to create a culture that simultaneously fosters experimentation, learning from failure, and understanding that repetition and practice are the prerequisites to master".

Erik, chapter 7

 

The book quotes some methodologies :

 

Really good book ! Time for next one !

Classé dans : book Mots clés : aucun
Fil RSS des articles