Tasks, parallel
UI Thread, helper class to show progress
UI Thread, resume PC from sleep problem
Adding “Processing” message at the end, which is usually replaced by "Loading XY...", but sometimes it doesn't and it looks much better, than to see some feed is loading awfully long. And it also doesn't look bad when at the end the “Processing” message changes to “Processing items”.
I quickly understood Quac is basically an always-on desktop version of a mobile app (width of 360px, mobile has usually 320px, so it fits nicely), permanently active. There's a lot of potential.
For games, a modding community can sometimes create an unbelieveable new experiences for gamers, and some mods even evolved to standalone titles (like Counter-Strike, DayZ, Dota 2, PUBG and more). So I'm aware of importance of customizability.
Everything is in config, even some entries may be kept undocumented.
JS Extensions for timeline stuff: mouse drag scroll, keyboard control. Extensions market.
DLL plugins, dynamic loading of plugins, internal API for the app. Plugin market.
The most “revolutionary” idea for Quac I had is the purpose of DLL plugins to manipulate with items in the timeline. Most common scenario is adding new items after refresh, but it could also filter items, sort items etc. Therefore I wouldn't have to implement all of these into the app itself and user could enable whichever he/she wants.
After my decision to use HTML instead of WPF for Quac timeline it occured to me, that would be possible to display the timeline in web browsers as well, e.g. in a sidebar, as I had before. I was really excited about this possibility, so I started to elaborate on this feature.
It would be nice, if Quac would act like a headless engine for generating the timeline for browser to show it. Therefore Quac would need to know, when the browser got the timeline, which may be tricky for a static file. But why bother, when I already knew how to create a web server in C#?
It's really nothing difficult, there's HttpListener
class for that, so the whole WebServer class has about 100 lines. I got it up and running in no time. Quac will sit in the systray and when the update comes, the notification icon lits up and user displays the timeline in a browser. The request from browser will tell Quac to mark that update as seen and to turn off the notification icon. Simple as that.
Speaking of the notification icon, it will be dynamic and change itself according to the situation it wants to broadcast – like there's timeline update, there's an error, a warning, time's up, you got mail or such. I'll probably leave them just as .ico files, so users would be free to mix and match icons as they wish.
Plugins will have the ability to change it, so if somebody creates an online thermometer plugin and shows the current temperature in the icon, it will be possible.
I've always had a worry about implementing OAuth, because everywhere I looked they wrote how difficult and hassle it is. But now I had no other choice, because without OAuth it works only for the dev account and I don't want to force my users to create a developer account :-)
Twitter OAuth not that difficult, use PIN for now, until website is complete.
…label border radius found a nice answer on StackOverflow and another for auto-height textbox.
RSS, RDF, Atom easily, not inventing wheel. It's similar to each other, so I used XDocument for that with ease.
Every feed item holds a “feed” object, containing basic info about the feed, because in one timeline there are multiple feeds.
As a storage I used serialization, until it became unbearable and I'll do it properly using SQLite database.
Register as Dev on Twitter website.
For starters I used a nice tutorial by Danny Tuppeny for simple Twitter posting and it really worked right away. But I abandoned his solution for one based on TinyTwitter, which I still had to modify heavily.
For example, it's quite old and therefore doesn't support 280 char tweets. I had to add tweet_mode=extended to API call and then in JSON response use full_text instead of text.
Speaking of JSON, for Qip I used heavily modified custom JSON library, even there's the popular Json.NET from Newtonsoft. It's based on per-character loop and I don't think there's much faster approach how to parse it.
I customized it to accept comments and commas after the last element or property (in a JSON5 manner). For viewing I used open source JSON Viewer by Eyal Post.
Problem datetime created_at thanks to solution:
```
DateTime createdAt = DateTime.ParseExact(tweet["created_at"],
"ddd MMM dd HH:mm:ss +ffff yyyy", new System.Globalization.CultureInfo("en-US"));
```
asdf
…asdf IconsDownload
RSS or favicon
Bitmap as PNG or ICO to PNG
Quac icon as dynamic bitmap.
Custom Quac icons, that gives users a freedom to use whatever icon they please.
Start
Everything by hand, designer not working. It was long, but on the other hand the Designer looked “magic”, while it's (obviously) just a code generator.
asdf
Removed ContextMenu, replaced by ContextMenuStrip. Fortunately it was painless.
I spent about a day in total trying to figure out, how to get window's true visibility. I want a shortcut to hide it when it's visible and show it when it's not, regardless of why – it could be minimized, but also obscured by another window.
I wasn't able to find a working solution using either PointToScreen, WindowFromPoint, GetUpdateRect, PointToClient or GetChildAtPoint methods, so ultimately I ended up using GetForegroundWindow
.
The core functionality was finished in a roughly 3 days, that's about 24 hrs of programming (read as “looking for solutions” :-) Adding features and polishing took much more time, about another 7 to 10 days. But it's hard to tell, I was adding a few things here and there over time.
It was a big hassle to tweak stuff in my current Twitter client as a browser extension, so it was terrific I was able to do it effortlessly for Quac. Shortly after that I found myself enjoying using Quac and actually preferring it over my current clients. This was a huge relief for me, because I was worried the transition will be difficult and I'd struggle to ditch them for Quac.
It also helped that I used the same keyboard shortcuts (duh... :-), but as a global hotkey, so it always shows Quac and not those extensions. I'm quite conservative, but it took me just a week to be confident enough to switch to latest Firefox Quantum as my main browser for good.
I have to admit, Quac makes me feel warm inside and proud. I can only hope everything will stay the same for years to come and I'm speaking mostly about Twitter API for third-parties.
I still use old Firefox, because I can't live without several XUL-based extensions, unsupported by Firefox Quantum. Notably Echofox (Twitter client based on Echofon) and Feed Sidebar (RSS reader), mainly because they show content in a really compact form.
I really dislike using obsolete software though, so I'm trying to find a replacement, but so far unsuccessfully and it didn't look good in the future either, so like many times before I decided to make it myself.
And to kill two birds with one stone, I'll combine Twitter and RSS into single app and optionally into a single feed.
Because implement RSS is much easier, I started and finished backend in a single evening – you add feeds, it downloads the content and send it via API. But what I realized afterwards is feed content is probably copyrighted and I can't process it in such manner.
So I'll create it as a regular application. I want it to be lightning fast and with small memory footprint, so I'll try it in WinForms first. WPF offers much more flexibility, but it's nowhere near WinForms in terms of low resource requirements.