tag:blogger.com,1999:blog-1409352204799783992.comments2024-03-18T01:12:21.817+01:00Agile & CodingDavid Vujichttp://www.blogger.com/profile/05640815111394960040noreply@blogger.comBlogger58125tag:blogger.com,1999:blog-1409352204799783992.post-27158939490731107732024-02-11T10:49:23.848+01:002024-02-11T10:49:23.848+01:00For PyCharm users.
Navigate to Settings -> Bui...For PyCharm users.<br /><br />Navigate to Settings -> Build, execution, Deployment -> Console.<br /><br />Make sure that <br />"use IPython if available" and <br />"Use existing console for Run with Python Console" both are checked.<br /><br />Navigate to the submenu of Console -> Python Console.<br /><br />In the "Starting scripts" box, add the following IPython configuration:<br /><br />%load_ext autoreload<br />%autoreload 2<br /><br />Now your PyCharm should be ready for REPL Driven Development.David Vujichttps://www.blogger.com/profile/05640815111394960040noreply@blogger.comtag:blogger.com,1999:blog-1409352204799783992.post-87271604354696194232023-12-20T09:07:28.263+01:002023-12-20T09:07:28.263+01:00very cool!
I use Vavr for Java.very cool!<br />I use Vavr for Java.Gadi Eichhornhttps://www.blogger.com/profile/02810013757582205895noreply@blogger.comtag:blogger.com,1999:blog-1409352204799783992.post-18655305414256783492023-05-09T21:28:44.443+02:002023-05-09T21:28:44.443+02:00Hello David, this is the article about using pytho...Hello David, this is the article about using python-polylith with aws cdk:<br /><br />https://dev.to/ybenitezf/aws-cdk-app-with-polylith-code-architecture-30e3Anonymoushttps://www.blogger.com/profile/12788724405116945313noreply@blogger.comtag:blogger.com,1999:blog-1409352204799783992.post-86402893706007476302022-08-31T10:54:39.346+02:002022-08-31T10:54:39.346+02:00In VSCode if you use code cells (#%%) it will auto...In VSCode if you use code cells (#%%) it will automatically give you keyboards shortcuts to run code interactively. I added the following keyboard shortcut in keybindings to also be able to do this for .py files without code cells:<br /><br />{<br /> "key": "ctrl+enter",<br /> "command": "jupyter.runFileInteractive",<br /> "when": "editorTextFocus && isWorkspaceTrusted && !jupyter.hascodecells && !editorHasSelection && !jupyter.havenativecells && !notebookEditorFocused"<br />}Simonhttps://www.blogger.com/profile/10061302465543410457noreply@blogger.comtag:blogger.com,1999:blog-1409352204799783992.post-41735183979883599002022-08-30T22:18:33.240+02:002022-08-30T22:18:33.240+02:00I feel the same, when I start to code in Haskell t...I feel the same, when I start to code in Haskell the REPL was my start point for everything.<br />Now in Python I use this <a href="https://plugins.jetbrains.com/plugin/9742-live-coding-in-python" rel="nofollow">plug-in</a> for PycharmAnonymoushttps://www.blogger.com/profile/17501478867755966400noreply@blogger.comtag:blogger.com,1999:blog-1409352204799783992.post-8897038735141300572022-08-22T18:36:52.856+02:002022-08-22T18:36:52.856+02:00Thank you for sharing!Thank you for sharing!Stephen Mhttps://www.blogger.com/profile/12057763370892642082noreply@blogger.comtag:blogger.com,1999:blog-1409352204799783992.post-22631538574499180922022-03-06T19:15:37.029+01:002022-03-06T19:15:37.029+01:00Thank you!
I haven't done that much work with...Thank you!<br /><br />I haven't done that much work with Tailwind yet. If you haven't already looked into it, maybe the ClojureScript & Tailwind examples here could help? It is made by Jacek Schae: https://github.com/jacekschae/shadow-cljs-tailwindcssDavid Vujichttps://www.blogger.com/profile/05640815111394960040noreply@blogger.comtag:blogger.com,1999:blog-1409352204799783992.post-16456636156438991882022-03-05T12:50:42.097+01:002022-03-05T12:50:42.097+01:00Thanks for a great post. Working with Storybook in...Thanks for a great post. Working with Storybook in ClojureScript has almost become pleasant ��<br /><br />I still need to figure out how I should approach getting Storybook to pickup Tailwind classes that are solely used in stories (and not in the actual application). Is that something you've encountered?Anonymoushttps://www.blogger.com/profile/05518657616294303542noreply@blogger.comtag:blogger.com,1999:blog-1409352204799783992.post-66713047186777153102021-09-22T18:25:27.969+02:002021-09-22T18:25:27.969+02:00I'm sure there are great alternatives out ther...I'm sure there are great alternatives out there! A more Clojure native alternative to Storybook would be DevCards. And you could switch out Material-UI for Tailwind or something similar.<br /><br />The bundle size you refer to would be in developer mode, right?David Vujichttps://www.blogger.com/profile/05640815111394960040noreply@blogger.comtag:blogger.com,1999:blog-1409352204799783992.post-69650362862164570692021-09-22T17:21:07.024+02:002021-09-22T17:21:07.024+02:00This loads 550 MB of dependencies and compiles a 1...This loads 550 MB of dependencies and compiles a 1.2 MB JavaScript bundle. I am sure that it would be possible to find dependencies that are way less complex but provide the same value as Storybook, Material UI and AWS Amplify. Also note that the first two are famous for breaking when updating React.Davidhttps://www.blogger.com/profile/04474796530166622930noreply@blogger.comtag:blogger.com,1999:blog-1409352204799783992.post-19840811518420058162021-09-05T12:49:32.417+02:002021-09-05T12:49:32.417+02:00Update: the example repo is updated with a configu...Update: the example repo is updated with a configuration that will make Storybook watch & parse files way faster. <br /><br />More importantly, also solves a nasty memory leak that was caused by unnecessary Webpack/Babel compilation made by Storybook. The ClojureScript code is already compiled to vanilla JavaScript without any need for Babel.David Vujichttps://www.blogger.com/profile/05640815111394960040noreply@blogger.comtag:blogger.com,1999:blog-1409352204799783992.post-9920916736072221802020-12-31T12:00:55.447+01:002020-12-31T12:00:55.447+01:00This post was very much inspired by the "9 St...This post was very much inspired by the "9 Stages of Debugging" tweet by https://twitter.com/CarlaNotarobot - a great account to follow!David Vujichttps://www.blogger.com/profile/05640815111394960040noreply@blogger.comtag:blogger.com,1999:blog-1409352204799783992.post-54367251728655763052019-04-08T19:53:36.590+02:002019-04-08T19:53:36.590+02:00Hi!
I think that Google has changed how third par...Hi!<br /><br />I think that Google has changed how third party scripts are handled in the Google Docs suite. Is it the notification about allowing a third party script that occurs? If you accept (when logged in) you will be able to run the Index Card Generator.David Vujichttps://www.blogger.com/profile/05640815111394960040noreply@blogger.comtag:blogger.com,1999:blog-1409352204799783992.post-54835962251935058412019-04-08T13:07:24.473+02:002019-04-08T13:07:24.473+02:00Hi,
I try to create the card, but it says I need a...Hi,<br />I try to create the card, but it says I need authorization.<br />I downlowd a copy but it does not work for me.<br />Should I download anything else?Anonymoushttps://www.blogger.com/profile/17836202078358484101noreply@blogger.comtag:blogger.com,1999:blog-1409352204799783992.post-78868034288254483002017-08-29T21:25:39.576+02:002017-08-29T21:25:39.576+02:00(I think this comment is about a different post in...(I think this comment is about a different post in this blog: http://davidvujic.blogspot.se/2017/08/ndc-oslo-video-javascript-in-2017-you-might-not-need-a-framework.html)<br /><br />Hi!<br /><br />Yes, to get everything installed correctly, you need to navigate to the project folder where the "package.json" file is. That's where you should type "npm install".<br /><br />The "npm start" command is intended to make it simple to run the web page in a local web server. If you are a Windows user, you could just create an IIS website instead - or install the node based "live-server", using the command "npm install --save-dev live-server".<br /><br />On Linux, and also on Mac OS X (I am pretty sure), Python is already installed. But not on Windows. If you like, you could install Python 2.7 - then you can use the built in SimpleHTTPServer.<br /><br />Thank you for your comment on this blog!David Vujichttps://www.blogger.com/profile/05640815111394960040noreply@blogger.comtag:blogger.com,1999:blog-1409352204799783992.post-48795514016390149292017-08-29T13:32:17.298+02:002017-08-29T13:32:17.298+02:00David, I don't know if I am doing things corre...David, I don't know if I am doing things correctly. I just guessed some things. This is what I did. I got an error - see below.<br /><br />(1) I downloaded the GitHub code at https://davidvujic.github.io/vanillajs-components/ and unzipped it.<br />(2) I downloaded npm and installed it. <br />(3) When I typed npm in the start area of Win 10, a noje.js command window appeared.<br />(4) I changed the directory to the one where your Github code is.<br />(5) I typed "npm install". (Lots of code appeared in a folder called node_modules.) <br />(6) I typed "npm start". I got an error message about a python server<br />(7) I went to the Python website and downloaded Python 3. <br />(7) I tried "npm start" again. I got the following error messages. Am I on the right track?<br /> Should I have downloaded Python 2? (KEY QUESTION) <br /><br />****** Error messages ******<br />17 error Windows_NT 10.0.15063<br />18 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"<br />19 error node v6.11.2<br />20 error npm v3.10.10<br />21 error code ELIFECYCLE<br />22 error vanillajs-components@1.0.0 start: `python -m SimpleHTTPServer 8080`<br />22 error Exit status 1<br />23 error Failed at the vanillajs-components@1.0.0 start script 'python -m SimpleHTTPServer 8080'.<br />23 error Make sure you have the latest version of node.js and npm installed.<br />23 error If you do, this is most likely a problem with the vanillajs-components package,<br />23 error not with npm itself.<br />23 error Tell the author that this fails on your system:<br />23 error python -m SimpleHTTPServer 8080<br />23 error You can get information on how to open an issue for this project with:<br />23 error npm bugs vanillajs-components<br />23 error Or if that isn't available, you can get their info via:<br />23 error npm owner ls vanillajs-components<br />23 error There is likely additional logging output above.<br />24 verbose exit [ 1, true ]<br />**** End error messages ******<br /><br />Peterpdmunrohttps://www.blogger.com/profile/06100846169652395677noreply@blogger.comtag:blogger.com,1999:blog-1409352204799783992.post-31328281786239327672017-08-10T15:14:50.796+02:002017-08-10T15:14:50.796+02:00Thank you for commenting!
I didn't dig much d...Thank you for commenting!<br /><br />I didn't dig much deeper than basic experimenting with TypeScript using Coda at the time of the publish date of this blog post. Maybe there's an IDE or editor that supports it today? I know there are a couple of Python coding apps in the App store.<br /><br />I guess one alternative is to run Remote desktop from the iPad to a machine in the cloud with a full blown IDE installed.David Vujichttps://www.blogger.com/profile/05640815111394960040noreply@blogger.comtag:blogger.com,1999:blog-1409352204799783992.post-12731359609337894902017-08-09T09:51:54.503+02:002017-08-09T09:51:54.503+02:00What's your opinion on TypeScript on iPad? I w...What's your opinion on TypeScript on iPad? I want to write serious TypeScript code on iPad and thinking - which tools are the best for the case? Is there already language server for ide checks or good autocompletion?<br />Did you change app or sticked with Coda?<br />Thanks!idchlifehttps://www.blogger.com/profile/09321656885177665304noreply@blogger.comtag:blogger.com,1999:blog-1409352204799783992.post-85396910207431127012016-04-19T15:40:39.291+02:002016-04-19T15:40:39.291+02:00Nice post! Thanks for that.Nice post! Thanks for that.Marcelo Lazaronihttps://www.blogger.com/profile/09612782074321216693noreply@blogger.comtag:blogger.com,1999:blog-1409352204799783992.post-25697024013822183912016-02-26T17:44:24.853+01:002016-02-26T17:44:24.853+01:00Thank you, Ashkan!Thank you, Ashkan!David Vujichttps://www.blogger.com/profile/05640815111394960040noreply@blogger.comtag:blogger.com,1999:blog-1409352204799783992.post-31420488915598733192016-02-26T15:41:55.184+01:002016-02-26T15:41:55.184+01:00Hi David,
Thanks a lot for the good library. I str...Hi David,<br />Thanks a lot for the good library. I struggling a lot to fake the EpiServer stuff and I think your library will help me a lot! Well a lot more than my big screen :D ;)<br /><br />I just wanted to thank you<br /><br />Sincerely<br />AshkanAshkanhttps://www.blogger.com/profile/02127447561740055366noreply@blogger.comtag:blogger.com,1999:blog-1409352204799783992.post-78176237191767251672016-02-05T07:39:42.956+01:002016-02-05T07:39:42.956+01:00Thank you for sharing!
I think VSCode is a really...Thank you for sharing!<br /><br />I think VSCode is a really good tool. Installed it but haven't yet tried it that much. But my impressions are (along with reading user comments about it) is that VSCode currently is just as good (or even a bit better) for asp.net core 1 development as Atom.<br />David Vujichttps://www.blogger.com/profile/05640815111394960040noreply@blogger.comtag:blogger.com,1999:blog-1409352204799783992.post-48825569184080283852016-02-05T01:32:02.475+01:002016-02-05T01:32:02.475+01:00Have you thought about trying out VSCode? I've...Have you thought about trying out VSCode? I've messed with it for a few minutes. Not a ton of time, though. I use visual studio and write C# for my day job. Wondering how VSCode holds up.<br /><br />Atom's pretty great, though. I've been using it for programming for fun, mostly with Haskell and Python. I really dig it too.<br /><br />It's funny for me, because I started off in vim and linux, writing ruby for giggles, then landed my first full time job and switched wholesale to windows. I really like both environments for different reasons. I'm also adamantly following the neovim project.<br /><br />Anyhow, interesting to see someone making the transition in the other direction (though I never did linux/python professionally)<br /><br />Happy hacking.doorhammerhttps://www.blogger.com/profile/12227499130501226848noreply@blogger.comtag:blogger.com,1999:blog-1409352204799783992.post-13906392225894576552015-11-23T11:14:34.983+01:002015-11-23T11:14:34.983+01:00Thank you for sharing your feedback!
I agree with...Thank you for sharing your feedback!<br /><br />I agree with you on 1):<br />sinon is probably better to use than faking objects manually. In this example I didn't want to risk leaving focus from the idea, by not using any frameworks beside the unit testing framework.<br /><br />With 2) I think it is spot on about the differences between DI and this approach.<br /><br />3): I am not sure that I agree, because the module(s) being faked is faked and controlled, just as if mocked and injected using DI.David Vujichttps://www.blogger.com/profile/05640815111394960040noreply@blogger.comtag:blogger.com,1999:blog-1409352204799783992.post-63719990961785195172015-11-22T20:16:33.116+01:002015-11-22T20:16:33.116+01:00David, here is three problems:
1) you change metho...David, here is three problems:<br />1) you change methods by assigning them some code instead of using any mocking framework like Sinon.js. And then you will have problems if you want to test behavior, for example if you'd like to be shure that some method was called just once.<br />2) you try to change behavior in beforeEach section. In real world test cases should define behavior.<br />3) you have to know all imported modules tree to run test. In real application these tree can be deep.<br /> But DI pattern allow you test only one application "class" and mock other dependencies.Anonymoushttps://www.blogger.com/profile/02382919581553501521noreply@blogger.com