Google event tracking used by a Delphi desktop application - delphi

I've come to a crazy idea to use Google event tracking in Delphi desktop application. I want to track users behaviour workflow to make application better. But it's in javascript.
Is it possible somehow to do it directly from application? Or do I need for example to make a webpage which communicates with Google event tracking API and application sends REST queries to that webpage?
Or maybe I can do it without javascript at all and directly from application?

You should be very careful with this, and warn your users.
Though software running locally is a different thing than software running from a web-site in a browser, the interconnectedness of software is increasing. So is the general feeling in the public on what is right and not to communicate.
For instance, a lot of software 'phones home' to check for the latest version without even asking permission to their users. I can understand that some users have a problem with that, but it indicates the general opinion on this is shifting. The vendors can track usage statistics based on that 'phone home' alone.
I'm not sure if the Google Event Tracking would be the best way to solve usage tracking from a desktop application, but the general idea (collecting usage statistics and error information) can work out very well.
Software from big vendors have been getting usage statistics from their software for years, and they ask their users up-front if sending statistics is OK, and at the time of an error, each time ask them if that is OK too.
In fact the book "Why Software Sucks ... and What Can You Do About It" and presentations from David Platt explains really well how to do this and how to communicate this to your users.
You need to do this in a very anonymous way, and you can because basically you are interested in these things:
what is the largest percentage of errors
what is the largest percentage of features used
what is the smallest percentage of features not used
As long as you communicate percentages, it is clear to explain to your users that the data will be very non-specific.
On the other hand: being able to focus on the actual errors can improve your software a lot.
The errors communicated back to you can contain much detail, so you need to either strip that detail out, or be very upfront with your users indicating which details are being sent to you when communicating individual errors.
--jeroen

I developed my own solution (I called it 'softmeter') to do exactly this. It is a dll that will do all the REST queries to Google Analytics.
There is sample Delphi code that wraps the DLL in a Delphi class so sending an event is simple as
dllSoftMeter.sendEvent('Conversion events', 'Donate clicked', 1);
If you do not mind using 3rd party libraries, you can use it.
In fact I found that most software using it, is Delphi made software.
Here is a more extended sample of the Delphi code for the implementation.
https://www.starmessagesoftware.com/blog/track-delphi-pascal-gui-application-google-analytics
You will need of course to get consent from the end-user.

Related

If WebGL isn't supported by my graphics card by default, why should I use it?

I am looking to make a web-based game. I saw lots of cool libraries that used WebGL (three.js, pixi.js, and more). The problem is that when I run the examples, I get the message "Your video card does not support Web GL."
Now, I could update my video card driver, but I'm not going to do that. Why not? Because the users of my game would never do that. Asking casual users (my target audience) to update their video card driver is a complete non-starter.
Is there a way to use WebGL without alienating a ton of users?
PS: In case you are wondering, my laptop is no slouch. I bought it Christmas '13 and it runs games like Bioshock Infinite flawlessly.
There are generally two reasons a video card driver may be blacklisted for WebGL by browsers:
because it has bugs that would allow malicious web content to exploit the driver/GPU to attack the system, or
because it has bugs or limitations that would result in severely incorrect rendering.
Because of the first, it's unlikely that, as a content author, there's anything you could do to enable WebGL, as that would constitute a vulnerability.
And this is why you can run BioShock but not WebGL: since the game is a regular application, by running it you've already trusted it with your system, so there's little benefit in preventing it from abusing the GPU/driver. Web pages, on the other hand, are not assumed to be trusted in this way. (If you ask me, it's a long-standing architectural mistake that regular applications have such free run, but that's a rant for another day.)

bluetooth communication in nxj

I'm nxj beginner.
I have some questions about bluetooth communication between PC and brick.
First, when bluetooth communication occurs, where is the birthplace processing this datas?
In other words, I want to know whether these datas will be processed on CPU or brick.
Second, what is exact roles CPU and brick in bluethooth communication?
That means what is processed on CPU and what is processed on brick.
I have searched almost web site but I can't find this anywhere.
Please help me. Thanks.
You can see it in the package structure.
lejos.nxt.*
This package contains classes running on the NXT-brick. All code in this package will be compiled for the brick and will run on the brick.
lejos.pc.*
Here the difference is not that clear. This is java-code you compile for personal computer. So most code runs on your computer. But some classes (e.g: RemoteMotorController) only send messages to the NXT-brick which gives commands to the motors.
lejos.pc.comm provides API's that allow you to communicate/control the nxt robot from the PC.
When importing the the libs to an Android project, it allows you to build an instance of the same environment used on a pc, but within android.
I agree it can be tough finding some things out. It would be great if there was as stronger lejos presence on SO
This question is months old and has remained un-answered I actually have a lot of questions about it myself, but I might be able to provide some insight for utter novices.
when using bluetooth with Android and NXJ robots, you use either lejos.pc.comm or lejos.NXJ.
Both provide APi's to do almost the same thing, but work a little differently. I don't know nearly enough about the NXJ api, but I do know that it is the one that lets you manipulate the robot much more effectively, such as outputting data to it's LCD screen, which you can't do with the pc.comm api
As far as I can tell, the pc.comm API uses both Android Bluetooth API's and it's own protocols to allow communication with Lego LCP commands.
(I want to come back to this, but I'm writing a dissert on the topic so I'll try to update it in a couple of days. Seems not many are interested though, shame)

Any good (free) text-to-speech engines out there?

I've been scouring the SO board and google and can't find any really good recommendations for this. I'm building a Twilio application and the text-to-speech (TTS) engine is way bad. Plus, it's a pain in the ass to test since I have to deploy every time. Is there a significantly better resource out there that could render to a WAV or MP3 file so I can save and use that instead? Maybe there's a great API for this somewhere. I just want to avoid recording 200 MP3 files myself, would rather have this generated programatically...
Things I've seen and rejected:
http://www.yakitome.com/ (I couldn't force myself to give them my email)
http://www2.research.att.com/~ttsweb/tts/demo.php
http://www.naturalreaders.com/index.htm
http://www.panopreter.com/index.php (on the basis of crappy website)
Thinking of paying for this, but not sure yet: https://ondemand.neospeech.com/
Obviously I'm new to this, if I'm missing something obvious, please point it out...
I am not sure if you have access to a mac computer or not. Mac has pretty advanced tts built into the operating system. Apple spent a lot of money on top engineers to research it. It can easily be controlled and even automated from the command prompt. It also has quite a few built in voices to choose from. That is what I used on a recent phone system I put up. But I realize that this is not an option if you don't have a mac.
Another one you might want to check into is http://cepstral.com/ they have very realistic voices. I think they used to be open source but they are no longer and now you need to pay licensing fees. They are very commonly used for high end commercial applications. And are not so much geared towards the home user that wants their article read to them.
I like the YAKiToMe! website the best. It's free and the voices are top quality. In case you're still worried about giving them your email, they've never spammed me in many years of use and I never got onto any spam lists after signing up with them, so I doubt they sold my email. Anyway, the service is great and has lots of features for turning electronic text into audio files in different languages.
As for the API you're looking for, YAKiToMe! has a well-documented API and it's free to use. You have to register with the site to use it, but that's because it lets you customize pronunciation and voice selection, so it needs to differentiate you from other users.

Which common features of desktop applications do most web applications miss? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Stackoverflow User Luke wrote in this answer:
The boundaries between desktop and web
applications have really blurred.
Whilst once upon a time the nature of
developing for the web was totally
different to developing for the
desktop, nowadays you find the same
concepts [...] cropping up in both.
Since I am continually looking to improve my existing web applications, I'd like to know which common features of "classic" desktop applications do most web application miss?
For example, most desktop apps prompt the user to save unsaved data leaving a page or closing a window - a feature that many web applications miss. It could be that some feature aren't even necessary or are compensated in some other way. Maybe there are features which can't be implemented in (a classic) web application?
The thing you'll never be able to imitate in a web application is the low latency and instant feedback of a well written desktop app.
Even with the ajax techniques to load only parts of the pages, there usually is a noticeable delay in the response (or maybe it's just me and my narrowband). You're (for at least a few more years) just bound to the orders of magnitude of speed difference between network access and no network access.
The Undo button.
Right-click application-specific pop-up menus is the thing I've noticed most.
Usually right-clicking on a browser application will bring up the browser pop-up menu rather than an application-specific menu.
Keyboard support on most web applications is weak to non-existent. This is getting better than it used to be but you will still find plenty of mainstream sites that can't even get the tab order to work correctly. Most sites don't handle focus correctly and force users to use the mouse to activate even the simplest of data entry forms. You can usually forget about accelerator key support.
You can't pull the plug when the application hangs. (Yes, I'm serious)
For fairness is to mention, that desktop-applications miss a common feature of webapps: XSS (Cross-Site-Scripting). ;-)
Support for Big Files.
Integration with the client OS.
Support for special Input/Ouput Devices.
3D or anything else computationally intensive (specific to each users).
Advanced graphics: I've written a C program that draws a surface joining Bézier patches in a simple window and I had to tweak it in unimaginable ways to get it to draw in a decent time. I can't imagine that being ported to the web.
I mean, doing advanced graphics is not what every application needs, but if displaying nontrivial pictures is slow, then we shouldn't even talk about animations.
One Proper Macintosh menu bar support.
If you're a long-term Mac user, even with two large monitors, you have muscles that swoop to the top of the screen for actions, comfortable in the knowledge that the infinite depth effect will kick in and you can slide along that edge, picking from the menus.
No in-browser app can deliver that experience.
Two Command-keys, which is a side-effect of the menu bar not belonging to the app but goes a bit beyond that - good desktop apps have command-key shortcuts (accelerators to you Windows guys, I'm not just talking the Mnemonics which work with alt-key support). Great desktop apps show little reminders next to the buttons that have accelerators, when you hold down the appropriate modifier keys and wait a fraction of a second.
Three Smarter tables. There are a lot of apps where some kind of spreadsheet view works as a paradigm, including editing, sorting, resizing columns. I think I've seen some odd examples of partial support but a good table in a web app is still a bit of a dancing bear.
Four Used to be right-clicking but I'm finding more and more apps that do this properly, like Kerio's excellent webmail engine. It is still missing in enough web apps to be worth emphasizing.
Displaying application request/process status or messages on Taskbar or Status bar.
For the web, Javascript can be used to update text on status bar, but its not a common usage.
The usability benefits of standard GUI elements that look and behave uniformly across applications.
(Although this will surely change as web app developers adopt certain GUI elements and patterns that are considered best-practice, notably by eventually using the same libraries, e.g. for drag-and-drop.)
A common feature of "classic" desktop applications is the ability to work without an internet connection. I miss that in Web applications.
For example, MS word works without an internet connection, but you need to be connected if you want to use Google docs.
Of course, it does not matter if the application requires an internet connection anyway. For example, if its a feed reader, I have to connect to the internet, whether I use a desktop reader or an online reader.
Drag and drop from Finder/Explorer into the web app. And vice-versa.
The ComboBox is the most notable widget omission.
On the web, lack of desktop features such as popup dialogues is actually a boon, making for a simpler interaction experience. Think also of the autosave draft feature of Gmail vs. the desktop convention of prompting the user to save.
So consider carefully before trying to reconstruct that desktop feature in your web app.
Decent help. Seems to always be an afterthought, if it's even implemented...
Desktop integration (may change if we get online desktops)
Offline use (does exist but it is early days)
(Reliable) Responsiveness
Reliability generally (somewhat debatable as there are pros and cons - e.g. your data is probably better backed up online, however security generally is less in your control with an online app, and if the network connection fails an online app tends to freeze or fail horribly.)
Blue Screen of Death
A task-specific UI with no extra controls. A web app, in addition to all the controls of the web app, also has back, next, bookmarks, etc buttons. You end up with an extra inch-high set of buttons that don't directly support the task at hand.
This isn't necessarily a programming feature, but the audience of an application will be different. For a web application you are cutting out a complete segment of your audience (those with slow or no internet access). While this is a relatively low number, it is a difference between a desktop application and a web application.

Do you chat online for work purposes?

I've worked with folks who are chatting online with their peers, constantly batting around ideas. I've also worked with folks who adamantly refuse and think it's a waste of time.
Are online live chatting forums of particular use to you? Why or why not?
Internal to your company, or external and world-wide?
Does your employer encourage or discourage their use?
Update: I see some people are voting this question down, yet so far all the answers have been positive, if with some reservations. If someone has a strong negative opinion (I hate online chatting and think it should be banned etc.) I'd really like to hear why.
If you have telecommuters, not chatting online will be the death of you.
Without chat, there is no interaction.
Without interaction, there is no problem solving.
Without problem solving, the code will suck.
The chatting part does waste a lot of time and I often wish I could just pull them out and just WriteSomeCode, but yeah, trade off scenario.
There's an additional benefit to using online converstations, in that it doesn't /have/ to be an interruption. If your working on something you can ignore them till you're done and they just have to deal with it. In real life you have a talking face to try get rid of. ( And the cool thing here is you can ignore them and they still get heard, have your cake and eat it too! )
I've used IM at the last three places I have worked. Currently the building that I am in is so large that it takes a couple of minutes just to walk to my managers office. Then there are the days that we work from home (1-2 days a week). Email for some purposes just doesn't cut it and the phone can be too disruptive and all encompassing for some tasks.
When I was doing consulting work I would give my IM contact information to my clients. About 25% of them would use it to contact me and I am still in contact with them to this day which opens up the possibility for future work! The clients that used IM felt that they had a better connection with me because they could see when I was online and available to talk.
I'm still in contact with old work colleagues through IM and this allows me quick access to their knowledge base as well.
My suggestions for using IM in the workplace are:
Use a client that supports multiple
protocols (MSN, Yahoo, AIM, Jaber,
etc)
Setup and use personal accounts for
each of the networks you are on
(i.e. don't use accounts tied
directly to your work)
Make sure your IM client records a
history of all of your conversations
Always be available but minimize
personal conversations
Provide your IM information freely
to friends, clients, and colleagues
Add appropriate groups (i.e.
friends, family, work) and filters
to reduce undesired interruptions
while still being available if
needed
Don't feel that you have to
respond to every chat request. Let
it set until you are ready to deal
with it
One other trick I use is to use text to speech software so that when a chat message comes in it is read allowed. When I am at home (or preoccupied away from the computer in the office) the message is automatically read allowed (I liken it to a ringing phone call) in order to get my attention. But, I don't have to stop what I am doing in order to know what the message is.
I used to. I found it a great resource to chat with people I used to work with. In our business I find that we tend to network alot and using that collective knowledge is awesome. Of course my company turned that off so they lose.
I know that a certain large Bank hasd an internal AIM setup so that they can IM each other. That was refreshing and dang useful. They also allowed some external access. Talk about getting the value of IM!
Yes, absolutly, I work with most of my employees, and employers via MSN/Yahoo/Skype/.../ it makes the work easier, because I can hire the better people without having to pay them to move to me.
When I need to collaborate with someone in another office, it's great ... when I'm deep in thought, I have to turn it off (just like e-mail).
It depends on the group dynamics and personal preferences. Personally, I have enjoyed my work groups that use chat to feed on each other's ideas and troubleshoot without as much walking around. If you are geography dispersed, its almost a necessity.
I find online chatting invaluable in many cases, but not normally instant messaging. Since I use many open source technologies at work, I tend to join the respective IRC channels, both to ask questions there, and sometimes to help others if I know the answer offhand.
It may depend on the work environment. As a self employed consultant, I'm always in chat - it's my primary communication to the world, along with emails for more official type communications.
Being able to converse with others creates synergy, but it also can cause distractions. A good manager can tell the difference.
At my last workplace, we used IM extensively for collaboration. Not so much at my present workplace. Infact, i have not once had to do that here in 6 months. But i do look around on the net for answers and sometimes i have posted queries on forums too. IM is a nice tool to have, but its also a time sink. Also, dont underestimate the lost focus. Its particularly hard to concentrate on getting that algo implemented right if someones constantly pinging you about how to establish a connection to an oracle database.
I work at home 2 to 3 days a week. I mainly use MSN to stay in touch with my coworkers. It's pretty useful to ask short questions quickly. If we find ourselves typing whole conversations we often agree to continue the conversation by phone.
I use IM to communicate with colleagues in other offices when it replaces a face-to-face chat. I turn off notifications in all my comms apps at work though, because they distract me otherwise.
I telecommute from California to Colorado and never have used chat. We do have daily SCRUM meetings and constant email threads. When I first started working remotely, we did try it but it seemed intrusive to several co-workers so we stopped using it, that was 4 years ago, I probably should give it another try.
It seems I have nothing to really add to what hasn't already been written.
I use it extensively, especially when remote people are involved in development. Without it your real time communication dies. It is the only viable method of communication that isn't as interruptive as phone calls or something of that nature. As we all know we can't just sit on the phone the whole time when developing, so chat is the next best thing for real time communication.
I personally don't like it. I think email allows you to take a little time to compose your thoughts.
IM seems to work for other people though. Whatever works!
Our entire business unit telecommutes. Only us first years are required to be in the office, so our enterprise IM solution is vital to staying in touch and on task. Its how my manager lets me know what project I'm working on, if I need to bill my time to another customer, or if I need to bounce ideas around. So yes, I do. Is it open for anyone to get on? No, not at all. You have to be on the intranet to access the system, and it is closed to any and all outsiders.
Out of the four professional jobs I've had over the past 8 years or so, I've only worked at one place that did not allow any type of instant messaging. All the other companies had at least some type of setup for intranet instant messaging.
I think that IM is almost necessary in today's business environment. I don't IM very much, but it's nice to have it available. Especially when I just need a quick answer to a question - like "Where is this file located?" and then boom I have a link to the file pop up right in front of my face.
I use IRC at work - it's almost a requirement for all of us who interact remotely (workign from home, different offices, and client sites) to be able to get help on problems fast.
Yup. It's actually required here. But only MSN though. We use it for development/task related communications with the team... which also help minimize noise since this company I'm currently working in is a big one where 90% are developers so utter silence is a MUST...
But if I've got questions to other members of the team, I prefer asking it personally though because I find it hard to explain some things when just chatting...
I've had to use it in my last job as my co-workers lived in the UK and my boss worked in California whereas I'm in Atlanta. It was used for quick questions and when it was "whenever you get the chance to respond" type thing. I could be on the phone and an IM pop-up and they would get an automatic message telling them that. Longer discussions were done with web cam and telephone and the ability to share a desktop to view code, data, etc.
My company won't allow it. Even if we run a IM server in house (so we aren't wasting time chatting with friends). I've tried to convince them, I find it really useful for knowing if someone is at their desk or not. The phones don't do that so well since if you don't pick up it redirects to a secretary that will get pissed if you are checking if someone's back every 5 min...
So I run a IM client on my phone so I can at least chat with a few people through out the day. (Less interrupting to others if my wife IMs me vs calls me and also easier to ignore if I need to).

Resources