KX Community

Find answers, ask questions, and connect with our KX Community around the world.

Home Forums kdb+ Whats the best toolset for developing in kdb+?

  • Whats the best toolset for developing in kdb+?

    Posted by sjt on February 21, 2022 at 12:00 am

    Im old school. APL introduced me many years ago to what Ive since learned to call the REPL and Ive loved it ever since. The Pragmatic Programmer taught me to pick one good text editor and use it for everything. Most of my kdb+ processes run straight on the development machine in front of me. So my preferred toolset is Sublime Text 3 and the q session window. To me it feels like P.J. ORourkes description of a Ferraris handling: direct from left brain to the road. I test expressions in the REPL, capture them in the text editor. I have good company: at Arthur Whitneys house years ago I saw his 17″ display had two Notepad windows and three DOS shells.

    If I were coding in a big language such as Java or even Node.js, I imagine I would appreciate Visual Studio and suggestions from Intellisense. And if I were coming from there, perhaps an IDE would feel more comfortable for q.

    On the other hand, very smart Charlie Skelton wrote Studio for kdb+; and the authors of KX Developer are no dummies.

    What do you use? And what would you miss if you had to code with just a text editor and the q session?

    sjt replied 1 month ago 5 Members · 5 Replies
  • 5 Replies
  • davidcrossey

    Member
    May 3, 2022 at 12:00 am

    VS Code in WSL with the KDB+/Q extension here

  • unterrainer_ale

    Member
    March 19, 2024 at 11:01 am

    I use kdb studio to test, debug and develop code and IntelliJ as an editor. I like IntelliJ because you can easily search for function usage, jump to definitions etc. It’s great when reading code. It also has a kdb analyst and q plugin so you can actually run code in IntelliJ (similar to studio you connect to a q process) and display results but I never really tried it.

  • dhodgins

    Member
    March 19, 2024 at 11:01 am

    Many of the places i’ve worked would rather their workforce did half the work they could do, instead of allowing use of free/cheap tools. Tools that do always seem to be there are:

    Notepad++ which supports many languages (you can download a q syntax file), has tabs, diff, column/area select, and autocomplete. Files are saved to a temp file even if you never hit save, or have a computer crash so you never lose work.

    WinSCP also seems to always be available which allows you to have a gui file browser for your linux server and double clicking files (if you set the preferences) will open the file in Notepad++ and every time you hit save WinSCP copies the files back. You have to be careful if your disk fills up as this can result in files being emptied when you edit them, but then do regular pushes to git and try to get a disk (eg local to a box rather than shared network) that won’t fill up.

    I sometimes write my own editor using JS, HTML5, and kdb+ websockets.

    I used to be a big fan of Eclipse but a few years ago the whole eclipse project became totally unstable for Java, the kdb plugin was abandonware on an old version of kdb, so I gave up on it.

    Be careful of webbased editors. They can be good but most tend to freeze when you run a query, if your query never comes back you lose all your work and can’t even copy and paste from the editor pane anymore.

  • adotsch

    Member
    March 19, 2024 at 11:01 am

    Hi,

    I am not saying it’s “the best”, buy may be worth trying. It’s somewhat similar to to Studio for KDB+ in browser using the http protocol.
    You don’t need to install anything, it’s a simple webapp: https://adotsch.github.io/dqweb/

    Features:

    • Tabs, Drag & Drop, rows, columns and stacks.
    • Persistent layout and code (the browser stores the data, survives restarts/reloads)
    • Syntax highlighting and basic code completion.
    • Single-line and multi-line code execution. Inlined results on same domain.
    • Working with multiple servers in the same document.
    • Trash: undo close documents
    • Save query results into CSV, XLS, …
    • Set warnings before certain queries
    • Server side debugging via extended trap
    • Client side macros
    • Multiple output windows
    • Code sharing via links
    • Export & import layout and code into JSON
  • adotsch

    Member
    March 19, 2024 at 11:01 am

    I solved AOC 2020/21 in this GUI, so it must be good.

Log in to reply.