Are there any GTD apps that sync with any of the common bug tracking apps? - bug-tracking

I'm trying to decide on a GTD app. Does anyone know of one that automatically syncs with Trac or, better yet, FogBugz?
My suspicion is that none does. Which leaves me with writing a script that does it for me.
Things stores its data in XML, but the contents of the tags are all binary, which makes writing a script nigh impossible.
OmniFocus stores its data in XML, and the contents are literal text. Plugin or script is possible.
The Hit List stores its data in a sqlite3 database. Possibly easier than XML, but I'm not sure yet. The downside is that THL doesn't support recurring tasks, which makes it less useful as a GTD app.
Has anyone tried this? Have I missed an obvious app?

ThinkingRock - Java application, XML data format with plain text, supports recurring tasks. No automatic integration built yet that I know of, but another possible option to script for.

Tomboy has some level of Bugzilla integration but nothing complex. Alternatively it would be fairly trivial to sync something plaintext based such as Vimoutliner (IMO: possibly the best GTD application ever) or Taskpaper.
Probably in terms of easiness it would go:
plaintext > XML > Database > Binary format X
You could just use wget and/or a simple perl script to download the tasks then run a few regular expressions to get it formatted correctly e.g.
<li> ... </li> -> [ ] ...
or in code:
s!<li>(.*)</li>![ ] $1!g

Why not use the task features of the bug tracking systems you're looking at as your GTD tool? Also have you looked at (task coach)[http://en.wikipedia.org/wiki/Task_Coach] It stores all its info in XML.

Related

Custom log processing/parsing

I have such log format:
[26830431.7966868][4][0.013590574264526367][30398][api][1374829886.320353][init]
GET /foo
{"controller"=>"foo", "action"=>"index"}
[26830431.7966868][666][2.1876697540283203][30398][api][1374829888.4944339][request_end]
200 OK
The entry is constracted using such pattern:
[request_id][user_id][time_from_request_started][process_id][app][timestamp][tagline]
payload
Durring request I have many point where I log something - app basically has complex behaviour. This helps me debug a lot the user behaviour.
The way I would like to parse it is that I would like to make have directory structure like this:
req_id
|
|----[time_from_request_started][process_id][timestamp][tagline]
|
etc
Basically each directory will have name based on req_id, with files wchich names are rest of tagline. These files will include payload.
And also I will have other directory, with users ids, which will contain symlinks to request done by this user.
First question: Is this structure correct? In my opinion it will make easy fast log access. The reason I want to use directories and files is that I like unix approach, and try it (feel by myself its drawbacks and advantages)
Second question: I will have no problem to use ruby for creating this. But I would like to learn some new tool, which is better suited for this. I am thinking about using just unix tools (pipe, awk etc) to achieve this, or write parser in golang which I am learning right now (even have time to implement simple map reduce). What tool is best suited for this?
I would not store logs in a directory to see how the users behave.
Depending on what behaviour you want to keep track of you could use different tools. One of these could be mixpanel or keen.io.
Instead of logging what the user did in a log file you would sent an event to either of those (they are pretty similar, pick the one you think has better docs / lib), then you would graph those events to better understand the behaviour of your users. I've done this a lot recently, to display data in a nice way I've used rickshaw.
The key point why I'm suggesting this is that if you go the file route you will still have to find a way to understand your data, something that graphs will help you a lot at. Also, visualization is something keen.io does by default, you may still want to do your graphs but it's a good start.
Hope this helped.
Is this structure correct?
Only you can know that, it depends directly on how the data needs be accessed and used.
What tool is best suited for this?
You could probably use UNIX tools to achieve this but it may as well be a good exercise to practice your Go skills by writing this. It would also be more extensible.

Server-side node.js templating and merging for text files

I am trying to see if there is a library that will allow me to do merging of a JSON object with a template (txt file) on the server side. Ideally, I would like it to be able to handle some conditional statements (e.g. if, greater than, equals etc.) and looping (e.g. for).
I know there are binding libraries (e.g. angularjs), and one option might be to hack it to extract the code required to do this. Alternatively, I could create my own solution, but would rather not re-invent the wheel.
I am new to Nodejs, so I'm thinking this seems like a problem that might have been solved already.
Any ideas?
All good.
Ended up going with doT.js. Great library for what I'm doing.

Which programming language allows to update any class on-the-fly?

I am wondering, are there any languages allows you to add/delete/update any class on the fly without reloading whole application? (Provided that I can accept some inconveniences like making sure that there is no methods running at the moment + some extra effort to 'migrate' class data members).
Web applications where you replace 1 file and it is used on the next client request is not what I need (like Perl, PHP). Application must be continuously running, and it have some internal state.
Other requirements are
No GIL or similar issues preventing from utilizing SMP
Preferably - existence of JIT-like VM (i.e. where performance is close to native code). Ideal solution would be to be able to reload module in CLang or any other LLVM-based language. It would be just perfect.
About the answers already made:
.NET/Java is not suitable - they both have too bulky VM's, and significant part of app will be running on Linux.
Erlang - looks like it's possible, but it's terrible for my naked eye, I just cannot look calm at it's if's, case's and strings. Also, I would prefer to avoid transfering bare sources to clients, compiled bytecode would be much better.
Erlang was designed to support hot code swapping as one of its high availability features.
Objective-C might fit the bill. You can use the functions documented here to add new classes and swap method implementations at runtime, and you can load new NSBundles with additional classes or categories on existing classes if additional implementations are required. GNUStep, while not implementing all of the recent Apple additions to the language, does claim to implement these features (see [1] and [2]).
The following are generally considered dynamic languages:
ActionScript
BeanShell
Common Lisp and some other Lisps
Groovy
JavaScript
VBScript
Matlab
Lua
Objective-C
Perl
PHP
Python
Ruby
Smalltalk
Tcl
...
Some of these languages are supported in the .NET Framework by the Microsoft Dynamic Language Runtime.
What type of application are you trying to write? On what platform?
The question of GUI vs. Server may rule things out as will linux vs. windows.
The following languages are dynamic:
Smalltalk
Perl
JavaScript
VBScript
Ruby
Modern JavaScript is currently in an arms race to be as fast as possible, so should be pretty quick on any platform.
Python can do this. Note the following:
The multiprocessing module.
The GIL is specific to CPython it's not inherent to Python.
The GIL is not the problem you think it is. It won't effect heavy IO use, and doesn't apply to C code, or C libraries (if wrapped correctly). If you are doing anything computationally intensive, it should be in C anyway (those parts anyway).
I have did some research on zero downtime service migration recently. And my solution is not a language-relative one. Here is the idea, we can dump the state of current service, create another process, transfer the connection state description to the new process, finally terminate the old process. As shown in following diagram:
With a well defined abstract service description format and migration protocol, you can migrate any kind of services from one process to another, which means, you could write a server in C++, and migrate the service to the new process written in Python without any disconnection. Of curse, you can migrate your service from the old version to the new version. Adding/Deleting/Updating classes won't be a problem. For more detail, you can reference to my article
Zero-downtime service migration
The difficulty of this kind of technique is that you have to dump the all state of the running service and load them on another process. For most libraries out there you could find, it is hard to get internal state of those classes, which means you may have to do some hack on them, or write your own library. It would be a nightmare to transfer service state for complex services, but for simple services, that's not a big deal.
We do this with a Seaside smalltalk webapplication running on the free version of Gemstone. Gemstone has been doing this for the past 20 years or so, so they have everything you need. Some of the high-availability features are not free.
Open source smalltalks don't have the extensive class version/migration gemstone has. The simple 'load a new version and migrate all instances' works with all smalltalks.
Take a look at Scheme. You can do object-oriented programming in Scheme using very simple extensions, such as the Berkeley extensions. Just extend the code to allow for replacing methods (should be very easy) and you can hot-swap them however you want -- the syntax would still stay simple because, well... it's Scheme. :)
Right now, the code for the classlooks something like:
(define-class (person name)
(method (greet) (print `Hello!))
...)
where person is a lambda. It should be pretty easy to change the define-class macro to make person a list, for example, so that you can add to or remove from it dynamically.
The Dart VM has great hot code reload support
which greatly improves the Flutter development experience.
https://github.com/dart-lang/sdk/wiki/Hot-reload
Java can do this with its debugging interface
http://download.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#RedefineClasses
http://download.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#RetransformClasses
or slightly older:
http://download.oracle.com/javase/1.4.2/docs/guide/jpda/enhancements.html#hotswap
Depending on the specifics of your project - Javascript might be the answer via Node.js (nodejs.com) which allows you to program an event based server using javascript that is interpreted by the V8 engine.
This approach can be ver efficient compared to traditional web-servers in circumstances where there are many connections at one time, and especially if there is a lot of idling around for the server. This is due to the event based nature of Javascript where the cost of idling is very low.
There are several methods for hot-swapping code using node.js - this should get you started: Node.Js in Erlang style? and https://github.com/kriszyp/nodules
Smalltalk can do it naturally, Common Lisp (CLOS) with a couple of tricks.
You could look through the list at http://en.wikipedia.org/wiki/List_of_programming_languages_by_category#Reflective_languages. One that I don't see mentioned here yet is Lua, which has a reputation as being fast compared to other dynamic languages.
Another strategy might be to look at the academic research. A possible starting point is http://scholar.google.com/scholar?q=ksplice, which is about patching a running linux kernel.
I'm not sure what degree of automation you're looking for. Obviously the general case of seamlessly replacing a running instance of program A with A' is difficult, even with some guarantees on what is allowed to change in A'.
Depending on how the pieces of the program that need to be updated can be grouped and isolated, you could put them in a shared library, and (re-)load the shared library at run time (using e.g. the dlopen family of functions if you're on unix).
you should use php for this, i too have a linux server, it is very good with permission to change files like i have this php code to open a text box with an editable on site file,
<?php
$fn = "test.txt"; //the path to any file
if (isset($_POST['content']))
{
$content = stripslashes($_POST['content']);
$fp = fopen($fn,"w") or die ("Error opening file in write mode!");
fputs($fp,$content);
fclose($fp) or die ("Error closing file!");
}
?>
<h4>You are editing <?php echo $fn ?> </h4>
<form action="<?php echo $_SERVER["PHP_SELF"] ?>" method="post">
<textarea rows="25" cols="40" name="content"><?php readfile($fn); ?></textarea>
<br/>
<input type="submit" value="Save">
</form>
Objective-C allows you to hot swap code, and there is a plugin which allows that. I answered similar question about Objective-C here

Is it or should it be possible to modify the GUI of an application after it's compiled?

I'm a Linux user, and I have been very hesitant to use Glade to design GUIs, since the xml files it produces can easily be modified. I know it doesn't sound like a major issue, but what if it's a commercial app that you just don't want people changing?
I use Mac OS X every once in a while, and I figured out that they use files called ".nib"s for GUIs. I think they're essentially the same type used in Nextstep and Openstep (there's even a Linux app which lets you edit these files). Anyway, these files are included in the application bundle, and according to some people, are completely editable. This person claims he even successfully edited Keynote's interface.
Now, why would that be possible? Is it completely okay for the end user to change the interface? Or is it better to have the GUI directly in the compiled application code, like traditional GTK apps?
OS X nib files are one option; the other option is to do things programmatically. For android, XML files can define the GUI or program code can do it. In Windows WPF, the UI is made in XML. Firefox/Mozilla? XUL, another XML-based UI language.
Most modern GUI toolkits have either both of these options or even just defining UIs in files.
But even binaries are modifiable. With a good binary reverse engineering tool, it's wide open. The only way to be really certain is to do what Apple did with iOS, and run signed code; the entire bundle is signed by a key and can't be run if modified.
This isn't a problem for most everyone. Why do you care if the UI is modified? The underlying code isn't, so functionality can't be added or modified.
As a corollary (and a little off-topic) something that you might have a valid concern about is stuff a little more like this.
I don't really see a problem with it. If a user messes up his UI, then it's his problem. Think of it like moddable games. Users always loved them, and in the end, most games benefit from it. There is usually nothing secret about an application's user interface. If there is, you could always do some sort of encryption.
As others have said, you can also add checksums if you just want to disallow editing.
The xml specifies little more than what the interface looks like. Without the compiled-in event handling code, it's pretty much useless. My opinion is customers change it at their own risk, and you might actually get some free useful improvements out of their hacks.
If you're really paranoid about people changing it, you could always add an MD5 digest verification step or something when you load the xml, or compile the xml string into a header file, but that defeats many of the benefits.
The theming engine can make substantial-looking changes to your GUI, as can tools like Parasite. Updating the Glade layout — at their own risk — is much safer than either of those.
What's wrong with users customizing the UI anyway?

How to manage application resources?

We are developing a web application which is available in 3 languages.
There are these key-value pairs to translate everything. At this moment we use Excel (key, german, french, english) for this. But this does not work well ... if there is more than 1 person editing this file, you have no chance to automatically merge the different files.
Is there a good (and free) tool which can handle this job?
--- additional information ---
(This is a STRUTS application) But the question is how to manage these kinds of information in general (or at least in an conveinient way, which also supports multiple users editing this single file ("mergeable" filetypes))
Why not use gettext and manage separate .po files? See that blog entry.
If you can store this information in plain text then you will be able to use a version control system like subversion to help you with merging changes. Subversion is free.
The free guide (the "Red Book") to subversion gives a fairly good explanation of how this kind of merging works.
http://svnbook.red-bean.com/en/1.5/svn.basic.vsn-models.html#svn.basic.vsn-models.copy-merge
EDIT: Another thought - if you really want to stay using a spreadsheet - Google Docs supports simultaneous editing of a spreadsheet. You could import your existing spreadsheet and get your multi-user merging wishes for free with very little change to how you work.
Good Question.
There are some "Best Practice" depending on what you actually code in (java, ms-windows c#).
I solved this (but I think there must be a better way) by using a SQL db instead of excel file, and a wrote a plug for VS (VB6,........,..., emacs) that was able to insert new keys into the db without going to round trip with version control. The keys are the developers name of what they think is a best guess for a label. (key => save, sv => "spara", no => "", en => "save").
This db can then be generated as a module, class, obj, txt, to appropriate code(platform)
and can be accessed, depending on the ide, so in c#, bt,label = corelang.save;
Someone else can then do all the language stuff, and then we just update the db and rerun the generation to the platform resources.
After years of seeing localization done, including localization at large companies like Sony. I can only say the "standard" is Excel :)
There are tons of good ideas around, and probably many better ways to do it, but in real-life excel seems to be the best/cost effective solution that doesn't require training or making complex new tools to get the job done.
Found out, that Intellij Idea (at leas in version 7 and 8) has an editor for application resources. But it is not free at all. And it does not scale for bigger resource files with more than 1.000 keys.
Another good choice would be to use Google's spreadsheets ... for those who don't know it - it is like an "online Excell web-application". It can handle concurrent access from multiple users. Yay! But sadly, it comes from Google. This makes it impossible to be used in commercial projects.
So,
still searching...
cheers,
mana

Resources