Companies like Spotify need vast quantities of data accessible at low latency for online services and,...
The post Indexing the Data Lake for Online Point Queries appeared first on Spotify Engineering.
Companies like Spotify need vast quantities of data accessible at low latency for online services and,...
The post Indexing the Data Lake for Online Point Queries appeared first on Spotify Engineering.
Local leaders say plan will transform funding so English regions no longer rely on Whitehall handouts for projects
England’s regional mayors will be able to break out of the “death grip of the Treasury” by borrowing to invest in big projects under “transformational” plans to shift power out of Whitehall.
For the first time, mayors will keep a share of income tax generated in their area from 2028, as well as business rates totalling tens of millions of pounds by April 2027.
Continue reading...
В прошлой статье (Непослушный using ) я разобрал, как using вмешивается в поиск имён и почему его поведение часто расходится с тем, что от него ждет программист, и на этом ветку статей про поиск имен (name lookup) можно временно закрыть.
Using'и попортят вам в проектах еще немало крови, но в целом их проблемы известны и легко ловятся, а теперь давайте поговорим обauto и выводе типов в шаблонах, который регулярно удивляет даже опытных программистов на C++, когда речь идёт о распаде типов (type decay) и неявных ловушках при работе с ним. Представьте, что у нас есть несколько переменных, которые выглядят разными: const int&, просто int, const int и int&&.
По наивной интуиции можно подумать, что компилятор должен относиться к ним по‑разному: и где‑то ссылка, где‑то константность, где‑то rvalue, но это будет работать только до тех пор, пока мы не используем auto или шаблон.
Потихоньку дописываю книгу, в целом каркас уже сложился и большая часть материала уже собрана и обработана в черновике, если вам интересно, что получилось, то главы выложены на гитхабе в русском и английском вариантах или тут, если вам больше нравится в виде статей, а то, что ещё дописывается уже больше шлифовка, чем поиск нужной формы. Оглавление и ссылки будут под катом.
Читать далее
В этой статье мы детально разберём, есть ли практическая польза от рекурсивного механизма в форке llama.cpp, и стоит ли овчинка выделки. Для объективности сравним поведение трёх разных моделей — от лёгких 7B до тяжёлых 32B — в одинаковых условиях, замерив качество и скорость
Читать далее
Моя Y-хромосомная гаплогруппа — G2a. Именно это когда-то подтолкнуло меня изучать происхождение мужских линий, их древние миграции и распространение среди современных народов.
Разбираясь в Y-хромосомном дереве, я обратил внимание на обособленное положение G относительно большой ветви HIJK, из которой позднее выделились H, I, J, Q, R и другие линии. Параллельно, изучая народы Кавказа, я узнал о картвельской языковой семье — самостоятельной ветви, к которой относятся грузинский, сванский, мегрельский и лазский языки.
Сначала это было только внешнее сходство двух обособленных ветвей. Но затем выяснилось, что среди сванов — носителей первой отделившейся ветви картвельских языков — доля G2a достигает примерно 78,5%. Высокая частота G2a наблюдается и у мегрелов, а генетические исследования дополнительно выделяют сванов как отдельный аутосомный кластер.
В статье я пытаюсь разобраться, является ли это простым совпадением, следом общего кавказского субстрата или свидетельством исторической связи между ранними картвелоязычными популяциями и отдельными ветвями G2a. Это любительская гипотеза, поэтому я отдельно рассматриваю источники, контраргументы, древнюю ДНК и границы выводов, которые действительно можно сделать из имеющихся данных.
Читать далееWe would love to hear about your workhorse appliances, why they’re so impressive and how long you’ve had them
An elderly couple in Gloucestershire are reportedly still using what is believed to be Britain’s oldest working fridge.
The Electrolux appliance was built in the 1930s and bought second-hand by their family in 1949, with the owners telling SWNS that it is “still going strong”.
Continue reading...No content available
No content available
Experts say lower-severity charges for American service personnel are deepening traumatic impact on survivors
American service personnel accused of rape on British soil are being charged with lesser offences by their military courts, a discrepancy that experts say is deepening the traumatic impact on survivors long after verdicts are passed.
There are more than 12,000 personnel stationed in US military bases across the UK, most of them in England. Although UK law enforcement has primary jurisdiction over crimes that occur when personnel are off duty, local police often choose to cede authority to the American military.
Continue reading...Writer Sarah Wilson argues we’re hurtling toward the same end as ancient Rome and the Mayan civilisation – but there’s plenty to fight for
In Sarah Wilson’s new book, one page is mostly blank. It’s intended as a reprieve, a neutral space “for you to stare at for a minute while your feelings catch up”.
You will need it. In I Eat the Stars, Wilson argues that the world as we know it is in collapse – and that we are too late to avoid the worst.
Continue reading...Both MPs have had the parliamentary whip restored following separate independent disciplinary processes
The MPs Diane Abbott and Joani Reid have been readmitted into Labour and had the parliamentary whip restored, just under two weeks into Andy Burnham’s premiership.
The party confirmed that this followed separate independent disciplinary processes, and Labour said the leadership played no role in either decision.
Continue reading...Removal of Soviet-era statues sped up when Russia seized Crimea in 2014, and since Putin’s 2022 invasion has moved at pace as Ukrainians question their identity
Since 2013 the plinth at the bottom of Taras Shevchenko Boulevard in Kyiv has been eerily empty. The scruffy monument is daubed in white paint and graffiti. Someone has stuck a Ukrainian trident where Lenin once stood, gazing down during the years of Soviet communism. A crowd toppled the sculpture during Ukraine’s Maidan revolution, which ousted the pro-Russian government, and smashed it with sledgehammers.
In June, Volodymyr Zelenskyy proposed putting a new figure on the plinth: Ivan Mazepa, a Cossack military and political leader, who broke with Moscow and fought for Ukraine’s independence. “I am certain that where Lenin fell, Mazepa will stand firm,” Zelenskyy said. He spoke next to a bust of Mazepa in the Pechersk Lavra, an ancient Kyiv monastery hit by Russian missiles.
Continue reading...Liverpool: Paul McCartney’s latest album has brought tourists here, but there’s so much more to see than the sign
Earlier this year, Paul McCartney released an album called The Boys of Dungeon Lane. Among the unashamed nostalgia is a wistful track, Days We Left Behind, which evokes memories of his visits to the Mersey shore with George Harrison and friends. Young Paul was, it turns out, a keen birdwatcher.
Perhaps inevitably, the album has brought crowds of tourists to photograph the sign. The Speke end of the lane where they mostly gather is uninspiring, bounded by remnants of a demolished pub, a solar farm and an electricity substation.
Continue reading...Test yourself on topical news trivia, pop culture and general knowledge every Thursday. How will you fare?
The Thursday quiz was all set to ask a question about Javier Milei’s improbable claim that US Democrats were financing an anti-Argentina campaign at the recent Fifa men’s World Cup. However, the quiz cannot work out how US lawmakers managed to ensure the Argentinian side had not a single effort on goal in 90 minutes during the final, which is really what did for them more than anything. Never mind, 15 questions have still been rustled up on topical news, popular culture and general knowledge. There are no prizes, but tell us how you got on in the comments. Allons-y!
The Thursday news quiz, No 258
Continue reading...Small boats and kayaks connect the sparse communities and flourishing wildlife living on the thousands of islets on the Baltic coast
At 5am on Arkösund bay, it is so light it could be midday. I slip out of the pretty clapboard Arkösunds hotell, opened in 1895, as a small boat putters into the Baltic Sea, the sun sparkling on its calm waters. A wooden boardwalk invites me on to a string of tiny islets as geese arrow overhead and a mother swan coaxes her fluffy cygnets into a nook under a bridge.
I’m on Sweden’s east coast to explore the Östergötland archipelago, a sprawl of about 9,000 islands scattered across the Baltic Sea a few hours south of Stockholm. Quieter and less crowded than the better-known isles off Stockholm or Gothenburg, it covers several pockets of coastline and smaller archipelagos: Arkösund, Sankt Anna, Gryt and Tjust. The larger islands are flecked with traditional red timber summer houses, and are home to seals, sea birds, and dense, verdant forests of alder, cedar, oak and pine.
Continue reading...Creatives priced out of Abidjan have breathed new life into a city that was hit by a jihadist attack in 2016
By the poolside of La Fourchette de Rōze hotel in Grand Bassam, a Côte d’Ivoire city sandwiched between the Ébrié lagoon and the Atlantic Ocean, a birthday party was in progress. On the second-floor gallery, the artist Nuits Balnéaires stood by a huge painting in one corner and looked out through the window towards the billowing waves of the Atlantic Ocean.
“It’s poetic … that immense energy of the ocean, which also fuels my work,” the Ivorian visual artist said. “The natural elements are the very essence and foundation of my artistic practice,” he added, as he reflected on the way in which his name, which translates as “coastal nights”, matched the ambience.
Continue reading...Ally forced to resign, with opposition parties reinvigorated and strongman leader’s grip over media channels rocked
Even the night before Narendra Modi accepted the resignation of his education minister, India’s prime minister appeared confident that the largest mass uprising to take place in his 12 years in power would do little to rattle his government.
Addressing his “young friends” in a late-night Instagram selfie reel on Friday, he thanked the people – who were mobilised en masse across the country, shouting anti-government slogans – for their “thoughtful suggestions”.
Continue reading...In today’s newsletter: Across the country, a younger generation is turning private disillusionment into public defiance against a government that once felt untouchable
Good morning. As flames engulfed parts of France and Spain this weekend, in India, the prime minister, Narendra Modi, was trying to put out a very different kind of fire. Thousands of people arrived in Delhi on Saturday to demand the resignation of his education minister, Dharmendra Pradhan. When he stepped down in the early afternoon, the protests turned into a triumphant block party.
But the Cockroach protests that have swept through India this summer are about much more than a single minister. They have humiliated Modi and undermined the indomitable power of his Bharatiya Janata party (BJP) that has ruled India for the past 12 years. They’re also a lesson in using humour to political advantage.
Wild fires | Authorities in France battled to contain a huge wildfire near Bordeaux in the south-west as Spain’s prime minister, Pedro Sánchez, warned Spain and the Iberian peninsula were suffering the effects of the climate emergency.
Germany | A man suspected of driving a van into a crowd near Berlin’s Pride festival then going on a knife rampage in an Islamist terror attack has been shot dead by police, German officials have said.
Iran | The US has paused strikes on Iran for a second night as top military officials advised Donald Trump to halt his bombing campaign, and diplomatic negotiations have continued to avoid a return to all-out war.
UK politics | Britain’s foreign secretary, Ed Miliband, is to indicate he will put the climate crisis and overseas development at the heart of UK international relations by taking up the country’s seat on the board at the World Bank.
UK news | Five Palestine Action activists face being sentenced as terrorists for breaking windows and throwing red paint at a branch of Barclays Bank in Lancashire.
Monday | Andrew and Tristan Tate are due back in the Florida court where they’re fighting their extradition to the UK, to face rape and sex-trafficking charges.
Tuesday | Donald Trump and Volodymyr Zelenskyy are expected to be among those attending the Washington DC memorial service for the late South Carolina senator and Trump ally Lindsey Graham.
Thursday | People will go to the polls to elect the next mayor of Greater Manchester, who will replace Andy Burnham.
Continue reading...Wind and record-breaking heat are fuelling the continent’s explosive fire season, with Spain and France among worst hit
A combination of an unusually wet winter, very low rainfall since spring and repeated record-breaking summer heatwaves is likely to explain why wildfires have ignited, spread and resisted control so readily across France and Spain in recent days.
About 90% of wildfires are started by human activity, typically igniting “fine fuels” such as vegetation grass, pine needles, litter and twigs. And recent weather has almost certainly made ignition far easier. Drought in western Europe has turned this vegetation – which normally dries after only a few hours of heat and low rainfall – into tinder.
Continue reading...The classic gym routine doesn’t isolate your stomach muscles as much as you might think, but here are five that will
If someone in a film or TV show wants a six-pack, chances are they’ll drop to the floor and start doing sit-ups. According to Dr Lee Brown, senior lecturer in strength and conditioning at the University of East London, that’s more Hollywood than science.
“It’s embedded in the archaic practices of boxing coaches and therefore everyone seems to follow it,” he says. “But they’re far from the best exercise for training your core.”
Continue reading...Cockroach Janta party says government has broken promise, with detentions in Delhi, Assam, West Bengal and Bihar
India’s youth-led “Cockroach” movement, whose nationwide protests forced the resignation of the education minister, has accused the government of backtracking on its promise not to act against student protesters and has threatened to restart demonstrations.
The Cockroach Janta party (CJP), which organised mass protests over exam paper leaks and other irregularities, said it had received reports of hundreds of students being detained or “harassed” by police.
Continue reading...Local civil rights group alleges authorities removed evidence of killings amid communications blackout
At least 30 people are alleged to have been killed in Pakistan-administered Kashmir in the past two days as part of what has been claimed is a brutal state crackdown that has engulfed the disputed region for weeks.
According to a local civil society group, Joint Awami Action Committee (JAAC), the Pakistani security services fired on tens of thousands of peaceful protesters, killing 25 people on Monday and five more on Tuesday.
Continue reading...Reverse Engineering in the context of database-driven application development means generating Java persistence artifacts such as entity classes and mapping files from an existing database schema.
This is useful when the database already exists, especially in legacy systems or large projects where creating entity classes manually can be slow and error-prone.
Until now, these features were provided by the separate Hibernate Tools project. Starting with Hibernate 7.4, the core Hibernate Tools modules are part of the Hibernate repository. Maven and Gradle (and even Ant) users can now access reverse engineering through the Hibernate build plugins. This is especially useful for database-first projects, where the schema already exists and the application needs an initial set of persistence artifacts.
IntelliJ IDEA also provides Reverse Engineering features that can help developers generate JPA entities from an existing database, generate Flyway or Liquibase migrations from JPA/JDBC entities, and much more.
In this article, let us explore both Hibernate 7.4 and IntelliJ IDEA Reverse Engineering capabilities and understand which tool to use in which scenario.
You can check out the sample code for this article in this GitHub repository.
Hibernate 7.4 can inspect an existing database and generate artifacts such as:
In the sample project, the reverse engineering workflow is configured using the Maven plugin with reverse engineering customization specified in hibernate-reverse-engineering.xml as follows:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-reverse-engineering SYSTEM
"https://hibernate.org/dtd/hibernate-reverse-engineering-3.0.dtd">
<hibernate-reverse-engineering>
<type-mapping>
<sql-type jdbc-type="NUMERIC" hibernate-type="big_decimal"/>
<sql-type jdbc-type="OTHER" hibernate-type="pg-uuid"/>
</type-mapping>
<table-filter match-name=".*" package="com.jetbrains.entities"/>
<table-filter match-name="flyway.*" exclude="true"/>
<table name="products" class="Product">
<primary-key property="id">
<generator class="sequence">
<param name="sequence_name">product_id_seq</param>
</generator>
</primary-key>
<!-- other config -->
</table>
<!-- other tables config -->
</hibernate-reverse-engineering>
This configuration lets us customize type mappings, package names, table filters, class names, and primary key generation.
Configure the hibernate-maven-plugin in pom.xml as follows:
<properties>
<!-- update the version to the newer version of Hibernate -->
<hibernate.version>7.4.0.CR1</hibernate.version>
</properties>
<plugin>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-maven-plugin</artifactId>
<version>${hibernate.version}</version>
<configuration>
<revengFile>hibernate-reverse-engineering.xml</revengFile>
</configuration>
<executions>
<execution>
<id>generate-entities</id>
<phase>generate-sources</phase>
<goals>
<goal>hbm2ddl</goal>
<goal>hbm2java</goal>
<goal>hbm2dao</goal>
</goals>
</execution>
</executions>
</plugin>
The hbm2java goal generates JPA entity classes from database metadata, while hbm2ddl can generate database schema SQL. The hbm2dao goal can generate DAO-style helper classes with methods to perform CRUD operations on entities.
To generate the artifacts, run:
$ ./mvnw generate-sources
This Maven goal generates JPA entities and DAO classes in target/generated-sources, and schema.ddl file in target/generated-resources directories.
Generated code is rarely the final version of an application model. After the first generation, developers often add validation annotations, helper methods, domain logic, fetch strategies, and other project-specific changes.
If these files are regenerated later, manual changes can be overwritten. This is why a regeneration workflow may not be ideal when developers edit generated entities directly.
However, regeneration is not always a drawback. Some teams prefer to keep the reverse engineering configuration in source control and make generation part of the build. In this setup, the output is reproducible, works in CI/CD, and does not depend on a specific IDE.
For example, a CI check can regenerate the artifacts and fail if the generated files are different from the committed version.
This workflow also works well with versioned database migrations. Migration scripts can remain the source of truth for schema history, while Hibernate reverse engineering generates Java artifacts from the current database schema.
Hibernate also has a built-in schema update mechanism, and the reverse-engineered output can be further customized with custom RevengineeringStrategy, so the underlying model doesn’t have to be a rigid, one-size-fits-all script either.
IntelliJ IDEA provides a more interactive and flexible reverse engineering workflow. Instead of creating and maintaining a reverse engineering XML file, we can connect to a database from the IDE, select the tables, and generate JPA entities directly.
More importantly, IntelliJ IDEA supports progressive synchronization between the database schema and the code. When the database changes, the IDE can help sync those changes into existing entity classes without forcing a full regeneration. This helps preserve manual modifications that were made after the initial generation.
That difference matters in real projects. Entity classes often become part of the domain model, not just generated database mirrors. Being able to evolve generated entities safely is more valuable than repeatedly recreating them.
This functionality is provided by the IntelliJ IDEA Ultimate, so you need a subscription. It is not available in IntelliJ IDEA Community Edition or in other IDEs (yet), and it cannot be run as a command-line step in a build pipeline.
IntelliJ IDEA’s reverse engineering provide additional features apart from generating JPA entities from tables. The IDE supports related workflows such as:
To learn more about these features, explore the following articles:
This makes IntelliJ IDEA a better fit for day-to-day development, especially when the schema and code evolve together. It provides a guided workflow, visual database integration, and incremental updates without requiring a build-time generation configuration for every change.
Hibernate 7.4 reverse engineering is a strong option when we want a repeatable, build-driven process. It works well for generating the initial version of entities and schema SQL from an existing database, especially in automated workflows.
IntelliJ IDEA is more suitable when we want an iterative workflow. It helps developers progressively synchronize code and database changes without losing manual entity customizations. It also supports additional workflows around migrations and Spring Data JDBC, making it more feature-rich and flexible for application development.
Both approaches solve the same core problem of generating Java persistence artifacts from an existing database schema, but they are designed for different situations.
Use Hibernate 7.4 Reverse Engineering when:
Use IntelliJ IDEA Reverse Engineering when:
IntelliJ IDEA is generally a strong choice for day-to-day development because it lets you evolve the database and the Java model together, as long as you have an Ultimate subscription and don’t need the step to run outside the IDE. It understands what already exists in your code and can merge schema changes into it, rather than replacing everything from scratch.
If your team needs this to run in any IDE or as part of a CI/CD pipeline, or if you prefer a version-controlled, reproducible generation step, Hibernate 7.4’s build-tool-based reverse engineering is the better fit.
If you are starting a brand-new project from an existing database, either approach can give you a solid starting point. From there, the right choice mostly comes down to your team’s workflow and tooling constraints.
Women and men exhibit different heart attack symptoms. Knowing these lesser-known factors can help save your life
A few months ago at work, when I rose from my seat and walked a few steps, something felt off. There was a strange pressure in my chest and rib cage, but I ignored it, took my water bottle from the kitchen and returned to my desk.
The next day it happened again. There was no pain and my breathing was fine. But whenever I stood up and took a few steps, the odd squeezing would return. I work at a hospital as a neurosurgery coordinator, and the wall was lined with posters about stroke and heart distress signs. I barely glanced at the pictures, having memorized them years ago.
Continue reading...Avoid espresso martinis and wear the right pyjamas: experts give tips on how to sleep when it’s hot outside
Getting a good night’s sleep when it’s hot out can feel impossible. Unfortunately, worrying about not being well-rested doesn’t help.
Experts say worrying about sleep in warm weather will inevitably make you feel worse. “When people cannot sleep because they are too hot, it often becomes both a physical and a mental challenge,” says Dr Shelby Harris, founder and director of NY Sleep and Psychology, and author of The Women’s Guide to Overcoming Insomnia. “They may start watching the clock, worrying about how tired they will be the next day, or trying harder to force themselves to fall asleep.
Continue reading...