What code did you write today?

Page may contain affiliate links. Please see terms for details.

jongooligan

Legendary Member
Location
Behind bars
public static void main(String[] args)

Having to revise Java. Haven't written any code for around three years but now someone is threatening to leave and there's nobody else left that's ever done any Java. Can't say I'm thrilled - looking forward to retirement and I could do without this.
 
OP
OP
Shut Up Legs

Shut Up Legs

Down Under Member
It's amazing what a night's sleep can do :smile:. Having struggled to find the cause of a source code bug, which myself plus one of my colleagues had been discussing for several days, and had no luck resolving, I fixed it this morning. I got into work, had a sudden spark of genius, and made and tested a code change, and voila! It worked just as I suspected it would. :wahhey:
 

mjr

Comfy armchair to one person & a plank to the next
I suffered a Heisenbug on Monday: script doing some SSL certificate processing didn't work, so I added some debugging-logging calls which showed nothing wrong but the script worked... so I reverted the change (using the change manager, not merely deleting the additions) and it worked. Nothing should have been cached there so I still don't understand why it didn't work before adding the logging and I've used the same test data all through :wacko:
 

mybike

Grumblin at Garmin on the Granny Gear
I suffered a Heisenbug on Monday: script doing some SSL certificate processing didn't work, so I added some debugging-logging calls which showed nothing wrong but the script worked... so I reverted the change (using the change manager, not merely deleting the additions) and it worked. Nothing should have been cached there so I still don't understand why it didn't work before adding the logging and I've used the same test data all through :wacko:

Bit like those bugs in VBA* where it works fine when you step through the code but will not run.

*Used because IT wouldn't allow me to use real software so I didn't have to do lots of work.
 
OP
OP
Shut Up Legs

Shut Up Legs

Down Under Member
Thread resurrection here. I just got a basic prototype of an audio player application working under Linux. It's written in Java.

So far, it's very simple:
  • there's a main window, with a File | Load menu to select an audio file for playing. When you select the file, the application creates a FIFO used to send commands to the 'mplayer' process, and starts the 'mplayer' process to start playing the given file.
  • 2 buttons, Pause and Stop, control playback. Pause will both pause and unpause the playback, while Stop will terminate playback so that to play the file again, you have to reload it.
  • the application removes the FIFO on exiting, or when the Stop button is used.
I have a long list of features I want to add, such as:
  • playlist support - loading, creation, update, copying, etc.
  • playback of selected files, all files under an artist directory, all files under an artist's album directory, etc.
  • download of lyrics, graphic equaliser, etc.
Yes, I know, there's Amarok and various other Linux applications that do this, but they don't do it quite the way I want it done, hence my efforts to write my own.

I just added buttons to set the playback speed to 1x or to 2x. Songs sound hilarious at 2x.
 
Last edited:

RWright

Guru
Location
North Carolina
I have been doing some Windows desktop skins with Rainmeter and Lua. I have mostly been doing some weather skins. It is not very difficult to learn but it is only made for Windows OS. I also made a skin that I put on a night time sky desktop wallpaper. The skin uses a weather site to get the current moon phase, which I use the info to display a picture of the current moon phase from photos I got from the NASA website. One of my monitors always has this night scene on it. I also learned much more about weather information and the moon than I ever dreamed of knowing. :wacko:

I can now tell by a quick glance at the moon if it is anything from a Waxing Gibbous to a Waning Crescent. :rolleyes:

Rainmeter is also good for putting a lot of system information on the desktop that allows you to monitor the system using very little resources. I don't even remember how I even found out about Rainmeter but I have had some fun using it. Some might not consider it full blown programming, which I don't either but using Lua with it can make it pretty versatile.
 
OP
OP
Shut Up Legs

Shut Up Legs

Down Under Member
I just started writing my audio player application. To take full advantage of features such as automatic handling of sub-window movement, resizing and docking, and save / restore GUI state on shutdown / restart of application, I'm writing the application as an Eclipse RCP - based one. It's quite a nice way to quickly have a working application, and lets you test design changes more easily. Lots of fun! :addict:
 

chriswoody

Legendary Member
Location
Northern Germany
I got a raspberry pi 3 for christmas and have downloaded OSMC, to use it as a media PC. Everything's working fine, it streams all of the content from my NAS onto the TV beautifully.

I'm currently busy getting to grips with Linux, so that I can program it to be connected to my VPN provider. I've managed to download open VPN, but I'm having the devils own job trying to load the VPN providers configuration files. I've been reading loads about using Linux via the command line in the pi and my minds melting. All great fun though!
 
OP
OP
Shut Up Legs

Shut Up Legs

Down Under Member
I just fixed another bug in my cycling logging Java application, this one fairly easy to find and fix. I just can't help myself: I'm still on the last week of my 5 weeks off, and I can't stop coding. There's no hope for me. :crazy: :addict:
 

Bollo

Failed Tech Bro
Location
Winch
Bumpo. I've been holding this one back, but I've been spending the least couple of months coding a front end using Angular 2 (or is it 4 now - hell knows).

Just......

:banghead::surrender::cry:
 
OP
OP
Shut Up Legs

Shut Up Legs

Down Under Member
I just fixed another bug in my cycling logging application, the one I wrote in Java in 2012, and which I've been extending ever since. It's not so much a bug this time as a consequence of the data that's in the .FIT files produced by my Garmin Edge 800. I found that when my application loaded .FIT files, the total climbing/descending just didn't add up to what I expected, and other applications produced different results that were closer to what I expected (e.g. SportTracks for Windows, and TurtleSport or GoldenCheetah for Linux).

So I turned on the detailed debugging, which I'd written into the application some time ago, and which is easy enough to activate. I found that there were gaps in the recording of the trip. I normally use per-second recording for the Garmin Edge 800 (and had used it also on the Garmin Edge 705 years ago), instead of the so-called 'smart' recording, which tries to minimise the size of the trip files by only recording significant changes in the trip, instead of recording a track point every single second.

As for the gaps I just mentioned: well, for some odd reason, the track points (which are basically GPS position, time, and altitude readings, supplemented with elapsed-distance readings added by the Edge unit) would be written every second only for about 4-5 seconds, then a gap of at least 3 seconds would appear, then the per-second recording resumed, and so on. This caused my application to give incorrect trip summary data, because I had assumed that the track points were recorded every second, but this clearly isn't the case. Thanks for nothing, Garmin! :thumbsdown:

Anyway, with some config file parameter tweaks, and some relatively minor code changes, my application now handles these .FIT idiosyncrasies properly. Before the changes, my total distance and climbing for this year, according to the summary pane on my application's main window, was 10,057km and 125,312m, and now it's showing 10,307km and 132,694m. :dance: Even better, one of the worst-affected trips, my Bormio - Passo dello Stelvio - Santa Maria - Prato - Passo dello Stelvio - Bormio epic, now shows the correct amount of climbing: it was showing only about 200m climbing, which of course is totally wrong for that route, and now it shows 3252m (and that I can believe, because it was a very tough day on the saddle).

One more interesting side-effect of the fix is that the trip summary file produced by my application, which contains just the main summary data for all the trips, rather than all the data from the .TCX and .FIT files I've imported into the application, is now about 9.7MB in size, where before it was about 13.5MB. I won't explain why, because it's a bit technical, but it's nice to see it shrink a bit.

Regards,

--- Victor.
 
Dabbling in Visual C to get up to date.
New project is a raked frame calculator to produce profile cutting and glass sizes for left, right rakes and peaked frames with or without sashes.
Lots of fun trigonometry and basic line and fill graphics.
The hundred grand production software can't do it, and they have little inclination to be bothered so I'll do it for fun!

It's like being back in the Delphi days only with the Microsoft 'just the same buy more fiddly' experience. It's ace!
 

Bollo

Failed Tech Bro
Location
Winch
.... so I'll do it for fun!
I'll do it for money! :tongue:

Are you using MS Visual Studio? I quite like Microsoft's Dev tools, although they bought in the VS version on the mac. They're newish all-language Dev environment VS Code is pretty cool once you get your head around it.
 
I'll do it for money! :tongue:

Are you using MS Visual Studio? I quite like Microsoft's Dev tools, although they bought in the VS version on the mac. They're newish all-language Dev environment VS Code is pretty cool once you get your head around it.

Yes I downloaded Visual Studio the other day and wanted to find a project to use as a learning curve.
I come from the days of text editors and compilers, and then Delphi 4 and Visual Basic in the MS Office suite. So with Visual Studio it just seems a case of finding what GUI elements will do stuff on autopilot (resizing and placement) and what I've got to do with donkey work in code (responses to redraw or button events and such). I'm writing for Windows 7, Server 2008 R2 and 10. It's all familiar and equally unfamiliar!

Just looking at Visual Studio Code. Looks like Notepad++ on steroids! I think I'll be downloading that soon ^_^
 
Top Bottom